Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

TCP server : socket not closing (already in use)

$
0
0

@FranMarelli wrote:

Hi everyone,

I'm trying to set up a TCP server application using ofxNetwork.
In the ofApp::exit function I use tcpServer.close() to free the socket.
It usually works but I'm getting problems in a particular situation :
if a client is still connected before the server leaves, the socket is left open (next time I start the server it says "socket already in use") although close() returns true. In any other situation, everything goes fine.
I tried disconnectAllClients() before close(), with no results.

Is there any other operation I should do before trying to close the socket ?
Thank you for reading,

François

Posts: 9

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles