I 'd like to connect my client.c to my server.c, but the outout for my client is "Connection refused". The test is following:
#./client 192.168.23.101 6000
Errore: Connection refused
Return connect: -1 - Connection refused, Codice Errore: 111
#./server 6000
Return listen: 0, Error Code: 0
Success
I know that errno = ECONNREFUSED meaning:
Quote:
int listen (int socket, unsigned int n)
The listen function enables the socket socket to accept connections, thus making it a server socket.
The argument n specifies the length of the queue for pending connections. When the queue fills, new clients attempting to connect fail with ECONNREFUSED until the server calls accept to accept a connection from the queue.
The listen function returns 0 on success and -1 on failure.
|
Listen work, but queue is full, I try generating other executable, but problem remains. How can I solve this problem?