170
"C" Programming Guide For Optimus S/R
Return
If successful, it returns 0.
On error, it returns -1.
The global variable
errno
is set to indicate the error condition encountered.
Refer to the header files for error codes.
See Also
socket_state
Purpose
To get the socket status for a connection.
Syntax
char socket_state (int conno);
int conno; /* connection number */
Example
val = socket_state (conno);
Description
The function gets the socket status for a connection.
Return
The return value can be one of the following:
ESTABLISHED
1
SYN_SENT
2
SYN_RECEIVED
3
LISTEN
4
CLOSING
5
See Also
socket_rxstat, socket_txstat
socket_testfin
Purpose
To check if the remote end of a connection is closed.
Syntax
int socket_testfin (int conno);
int conno; /* connection number */
Example
if (socket_testfin (conno)) Nclose (conno);
Description
The function checks if the remote end has closed the connection. (TCP only)
Return
If closed, it returns a non-zero value.
Otherwise, it returns 0.
See Also
Nclose
socket_txstat
Purpose
To get the transmit status for a connection.
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...