made better error messages for machines that cannot bind to local ports
This commit is contained in:
parent
780d88de83
commit
d5d8ce54b8
1 changed files with 2 additions and 1 deletions
|
@ -207,7 +207,8 @@ connection connect(const std::string& host, int port)
|
|||
|
||||
TCPsocket sock = SDLNet_TCP_Open(&ip);
|
||||
if(!sock) {
|
||||
throw error("Could not connect to host");
|
||||
throw error(hostname == NULL ? "Could not bind to port" :
|
||||
"Could not connect to host");
|
||||
} else {
|
||||
//TODO: add code in here which sets the socket to non-blocking
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue