INtime SDK Help
socktout (legacy networking)
INtime Help

The socktout call defines a maximum time to wait for completion of any subsequent calls on the socket.

int socktout(
  int s,
  unsigned int val
);

Parameters

s
The socket.
val
The timeout period in 10-ms units. Setting val to 0xffff disables the timeouts.

Remarks

After reaching the timeout limit, the timed-out socket call returns with the return value -1, and errno is set to EWOULDBLOCK. The socktout() call is a nonstandard extension to the INtime implementation of TCP/IP. Since the INtime environment does not have the alarm function built into Unix, this call serves as a substitute measure.

An example of using this function is when you want to receive a datagrams. Since UDP is unreliable service, the datagram might be sent but never received. If this occurred, your recvfrom() call would block forever unless you had first issued a socktout() call.

Return Values

0 (zero)
Success.
-1 and the function sets errno to one of these values:
E2BIG val is too big.
EBADF s is not a valid socet descriptor.
EUNATCH The TCP/IP software has not been loaded.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/sys/socket.h sys/types.h
sys/socket.h
netiff3m.lib
   
See Also