contents   index   previous   next



Socket blocking()

syntax:

socket.blocking(flag)

where:

flag - A boolean value indicating whether this socket is to be blocking or non-blocking.

 

return:

boolean - Whether the operation was successful.

 

description:

This method sets the state of the socket to be blocking if flag is true, and non-blocking otherwise. A blocking socket will wait indefinitely for data on reads, while a non-blocking socket will immediately exit with an error indicating that there is no data to be read. By default, all sockets are blocking when they are created.

 

see:

#link <sesock>, Socket select(), Socket read()

 

 


Socket close()