|
From: Camille T. <ca...@os...> - 2011-09-30 13:59:49
|
Hello, On 28 sept. 2011, at 19:46, Camille Troillard wrote: > I was testing TCP and found something that looks like a problem, at least, I'm not sure how to solve it. > > The way to reproduce it is easy: > - start a OSC TCP server on port 8000. > - send messages from a client on the server. > - close the server. > - try start the server again, it won't because the socket is already in use. > > It looks like the client got hold of the socket and the server can no more bind to it. I think there must be a problem in Liblo, can you please tell me if you can reproduce that issue, and perhaps help me find a solution? I think I understand the problem: As long as the client has instances of lo_address and that lo_send has not encountered any error, the socket is bound in some way, which prevents any new server to be opened on the same port. Consider this scenario: - Client sends to Server - Server is closed - Client tried to lo_send -> results in an error. Now I can opened a new server on the same port. Does it suggest that I should get rid of the lo_address every time a message has been sent? My application keeps track of lo_addresses and reuse them. Thanks for any pointers, I'd love to have this TCP layer working robustly. Best, Cam |