Metrologic Optimus S Programming Manual page 174

"c" programming guide
Table of Contents

Advertisement

168
"C" Programming Guide For Optimus S/R
socket_keepalive
socket_noblock
socket_push
If connected, it returns a non-zero value.
Return
Otherwise, it returns 0.
See Also
Nopen
Purpose
To set the dummy sending period for a connection.
int socket_keepalive (int conno, unsigned long val);
Syntax
int conno;
unsigned long val;
Example
val = socket_keepalive (conno, p);
Description
In some special application, the remote end will auto-disconnect if it never
receives any packet in a certain period of time. This function will send an
empty packet to the remote end to avoid such problem. (TCP only)
Return
If successful, it returns 0.
On error, it returns a negative value. (?)
See Also
Purpose
To set the connection for non-blocking operation.
Syntax
int socket_noblock (int conno);
int conno;
socket_noblock (conno)
Example
Description
This function sets non-blocking operation.
When in non-blocking operation, calls to network functions, which normally
have to wait for network activity to be completed, will return the negative value
EWOULDBLOCK when such a condition is encountered.
Return
If successful, it returns 0.
On error, it returns a negative value. (?)
See Also
socket_block
Purpose
To set the PSH flag on the next outgoing TCP segment.
/* connection number */
/* dummy sending period in milli-second;
set to 0 to disable dummy sending */
/* connection number */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents