New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ofxTCPServer doesn't manage connected clients correcly #128
Comments
ofxTCPServer: fix for client disconnection. Closed by cb4ba37 |
Hey Arturo I think there is a problem with some of these changes; in particular: bool ofxTCPServer::sendToAll(string message) {
} will disconnect a valid TCP connection...I haven't gone hunting in-depth, but I see that getNumClients returns TCPConnections.size()-1; so I'm assuming that [0] is the server? or reserved? somehow that scrambles the logic of how connections are being stored in the map... For now I'm just commenting out the disconnection lines...I'm happy to pursue further but figure you'll see the problem faster ;-) |
For now I'm doing: if(!TCPConnections[it->first].isConnected() && it->first < TCPConnections.size()-1) disconnect.push_back(it->first); but I don't really understand what ofxTCPClient is being stored in the map before I make a connection...is it the server itself that is being stored in the map first? |
Was this issue fixed after all? |
As far as I can tell this is still an issue. SendToAll will disconnect a client. |
Pushing back issues without assignee to 0.8.1. |
@arturoc - could you take another look at this, would be great to fix for 0.8 ? |
i think i fixed it already in a later commit, but i need to check. will do it in a moment |
i've tested with several clients and sendToAll and this seems to be fixed, indeed the line @gameoverhack points as the problem doesn't exist anymore. |
http://www.openframeworks.cc/forum/viewtopic.php?f=10&t=3319
The text was updated successfully, but these errors were encountered: