Network - Non-blocking
This commit is contained in:
parent
bbe59836da
commit
04436258a5
|
@ -77,6 +77,8 @@ NetworkClient::PrivateData::PrivateData(unsigned int socket)
|
||||||
sendPostBox = new PostBox<CustomNetProtocol>;
|
sendPostBox = new PostBox<CustomNetProtocol>;
|
||||||
this->thread.Create(this, false);
|
this->thread.Create(this, false);
|
||||||
|
|
||||||
|
connection->SetBlockingMode(false);
|
||||||
|
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,6 +217,8 @@ bool NetworkClient::Connect(unsigned short port, const char serverIP[])
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
privateData->connection->SetBlockingMode(false);
|
||||||
|
|
||||||
//Connect has failed
|
//Connect has failed
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue