<< Previous | Index | Next >>

sock_close


void sock_close( void *s );

Description

Close an open socket. The socket cannot be reused until it is completely closed.

In the case of UDP, the socket is closed immediately. TCP, being a connection-oriented protocol, must negotiate the close with the remote computer. You can tell a TCP socket is closed by tcp_tick(s)==NULL or by running sock_wait_closed(s).

In emergency cases, it is possible to abort the TCP connection rather than close it. Although not recommended for normal transactions, this service is available and is used by all TCP/IP systems.

Parameters

s

Pointer to a socket.

Library

NET.LIB (Prior to DC 7.05, this was DCRTCP.LIB)

See also

sock_abort, sock_tick, sock_wait_closed, tcp_open, udp_open


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