The SockIoctl() call performs special operations on the socket.
Syntax:
>>--SockIoctl(socket, ioctlCmd, ioctlData)-------------------------------><
where:
is the socket descriptor.
is the ioctl command to be performed.
is a variable containing data associated with the particular command. Its format depends on the command requested. Valid commands are:
sets or clears nonblocking input or output for a socket. This command is an integer. If the integer is 0, nonblocking input or output on the socket is cleared. If the integer is a number other than 0, input or output calls do not block until the call is completed.
gets the number of immediately readable bytes for the socket. This command is an integer.
Return values:
The value 0 indicates successful execution of the call. The value -1 indicates an error. You can get the specific error code SockSock_Errno() or SockPSock_Errno(). Possible values are:
socket is not a valid socket descriptor.
The request is not valid or not supported.
The operation is not supported on the socket.
Note: SockIoctl() interfaces with the C function ioctl() or, in the Windows environments, with ioctlsocket().