<< Previous | Index | Next >>

sock_alive


int sock_alive( tcp_Socket *s );

Description

This function performs the same test as tcp_tick(s) i.e., it checks the status of the socket and returns 0 if the socket is fully closed.

The processing overhead of tcp_tick() is avoided for cases where several sockets need to be checked in succession.

When this function returns zero for a socket, the socket is then ready for a new call to tcp_open() or tcp_listen() and friends.

Parameter

s

TCP socket pointer.

Return Value

 0: Connection reset or fully closed. Socket ready for re-use in another connection.
!0: Connection is opening, established, listening, or in the process of closing.

Library

NET.LIB

See Also

tcp_open, tcp_listen, sock_close, sock_abort, tcp_tick


TCP/IP Manual
Vol 1
<<Previous | Index | Next>> rabbit.com