VARKON Version 1.17D 2003-03-25


 
 

tcp_outint - function

 

Description

Send integer on specified socket connection. A parameter can be used to specify conversion between 8/16/32 bit integers.
 

Syntax

tcp_outint(socket, bytecount, byteorder, timeout, data);
 
INT socket
INT bytecount
INT byteorder
FLOAT timeout
INT data
 

Principal parameters

socket - id of the socket connection to use for send
bytecount - The number of bytes to be send. The only valid values are 1, 2 and 4. Varkon integer is 4 byte.
byteorder - If = 1 conversion is made from local to network byteorder. 0 = no conversion.
timeout - Time to wait when host is blocked.
data - The data to be sent.
 

Optional parameters

none
 

Return value

An INT value equal to the current error status as below:
4 = Operation was successful, 4 bytes sent.
2 = Operation was successful, 2 bytes sent.
1 = Operation was successful, 1 byte sent.
-1 = Timeout value is expired.
-2 = The descriptor is not a socket or the socket is not connected.
-3 = The network subsystem or the associated service provider has failed.
-18 = Winsock routine select() failed before sending.
-19 = Winsock routine send() failed.
-22 = The virtual circuit was reset by the remote side executing a "hard" or "abortive" close.
-23 = The connection has been dropped because of a network failure or because the system on the other end went down without notice.
 
 

See also

tcp_connect()     tcp_listen()     tcp_close()     tcp_inint()     tcp_outfloat()     tcp_infloat()     tcp_outvec()     tcp_invec()     tcp_getlocal()     tcp_getremote()    
 

VARKON Homepage Index