s25client
s25client copied to clipboard
Direct IP and passwords
When you open a direct IP game with a password and try to join without entering one, you get a message "connection to host lost". Which is simply incorrect as it has been refused as you entered no / wrong password.
Well, I think the problem is that the connection is dropped by the host before sending the message to the client. Perhaps we can hold the connection a bit longer until deletion, or something like that.
You are right. The problem is: The host sends a "invalid pw" message and closes the connection. Although the message is posted (flushed) the connection is closes at the same time. So either
- The message is still received but the connection lost gets checked before
- The message is not sent if the connection gets closed before
I'm not sure how to check this especially as it is much less likely to occur using 2 game clients locally. :/
Perhaps we can hold the connection a bit longer until deletion
Possible. But how much longer? And this would complicate the code... Probably wait till we use Boost.ASIO