Eddy DK Programmer Guide
108
SB_AcceptTcpMulti
Function
Grants network multiple connection of TCP socket handle waiting for
connection.
Format
Int SB_AcceptTcpMulti (int Socket_No, int wait_msec);
Parameter
Socket_No
wait_msec
TCP socket handle number waiting for connection.
(Return value of SB_ListenTcp)
Connection standby time (in msec)
Returns
-1 ~ N
New handle number of connected TCP socket.
-1: Socket error
0: Waiting for connection
N: New handle number of connected TCP socket.
Notice
When new handle number is given after connection is made, it will not close
previous handle waiting for connection, granting maximum of 1024 socket
connection.
SB_ReadTcp
Function
Read data from connected TCP socket.
Format
Int SB_ReadTcp (int Handle, char *Buffer, int Buffer_Size);
Parameter
Handle
Buffer
Buffer_Size
Handle number of connected TCP socket
Buffer point where packet data to be read will be saved
Size of the buffer to save
Returns
-1 ~ N
Size of the data read.
-1: Socket error
0: No data was read
N: Length of the data read
Notice
When return code is -1, it means the connection is lost with the client so
user has to close TCP socket handle.
SB_CloseTcp
Function
Close TCP socket handle.
Format
Int SB_CloseTcp (int Handle);
Parameter
Handle
TCP socket handle number to close
Returns
None
Notice
This function shuts down socket handle to finish communication and
closes.
Содержание Eddy DK
Страница 1: ...1 Eddy DK Programmer Guide Ver 2 5 1 1 2011 02 15...
Страница 10: ...Eddy DK Programmer Guide 10 2 3 Eddy CPU v2 1 v2 5...
Страница 36: ...Eddy DK Programmer Guide 36 2 4 4 External Device Interface Description...
Страница 47: ...Eddy DK Programmer Guide 47 Eddy S4M v2 1 Eddy S4M v2 5...