Sock.Close Method

Top  Previous  Next

 

Function:

For the selected socket (selection is made through sock.num) causes the socket to close the connection with the other host.

Syntax:

sock.close

Returns:

---

See Also:


 


Details

For established TCP connections this will be a "graceful disconnect", if the TCP connection was in the "connection opening" or "connection closing" state this will be a reset (just like when the sock.reset method is used). If connection was in the ARP phase or the transport protocol was UDP (sock.protocol= 0- 0- PL_SOCK_PROTOCOL_UDP) the connection will be discarded (just like when the sock.discard method is used). Method invocation will have NO effect if connection was closed at the time when the method was called (sock.state in one of PL_SST_CLOSED states).

This method will be ignored when called from within an HTML page. HTML sockets are handled automatically and your application is not at freedom to close HTML sockets arbitrarily.