Home  Contents

rawio:shutdown

Rawio Core4 Lua Event System

SYNOPSIS

flag = handle:shutdown([how])

DESCRIPTION

This call causes all or part of a full-duplex connection to be shut down. If how is "rd", receiving from the socket is shut down, if it is "wr", sending to the socket is shut down and if it is "rdwr", the complete connection is shut down. The default is "rdwr".

RETURN VALUE

On success, returns true. On failure, returns nil. In case of an error, the error can be retrieved using rawio:lastError().

NOTES

While shutdown closes the connection, the socket handle continues to exists. To close the handle, call rawio:close(), which also does an implied shutdown("rdwr").

SEE ALSO