Add NETReconnect and NETReconnectWithFlags to recover a disconnected socket.

r1485 | dcl | 2007-02-15 07:48:49 +1100 (Thu, 15 Feb 2007) | 2 lines
This commit is contained in:
Douglas Clowes
2007-02-15 07:48:49 +11:00
parent 2de2a0394d
commit 418f5fb5d9
2 changed files with 96 additions and 1 deletions

View File

@@ -76,10 +76,22 @@
of hostname are copied to pComposter
*/
int NETReconnect(mkChannel* self);
/* If a connection has been lost, try to reconnect using the same
* socket id if possible. Blocks for up to one second.
* returns 0 if in progress, 1 on success, a negative value on error
*/
int NETReconnectWithFlags(mkChannel* self, int flags);
/* If a connection has been lost, try to reconnect using the same
* socket id if possible. If (flags & 1) do not block, use
* NETConnectFinished to check success.
* returns 0 if in progress, 1 on success, a negative value on error
*/
/* *********************** DATA TRANSFER ******************************** */
int NETWrite(mkChannel *self, char *buffer, long lLen);
/* writes data to socket self, returns True if succes,
/* writes data to socket self, returns True if success,
false otherwise.
*/