User guide

Redpine Signals, Inc. Proprietary and Confidential.  Page 149 
R
R
S
S
9
9
1
1
1
1
0
0
-
-
N
N
-
-
1
1
1
1
-
-
2
2
2
2
/
/
2
2
4
4
/
/
2
2
8
8
S
S
o
o
f
f
t
t
w
w
a
a
r
r
e
e
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
M
M
a
a
n
n
u
u
a
a
l
l
V
V
e
e
r
r
s
s
i
i
o
o
n
n
4
4
.
.
1
1
5
5
struct TCP_EVT_SocketResp 
{ 
 UINT16 uSocketType; 
 UINT16 uSocketDescriptor; 
 struct sockaddr_in stLocalAddress; 
 UINT32 nErrorCode; 
 UINT16 max_segment_size; 
}; 
Structure Member 
Name 
Description 
uSocketDescriptor 
Created socket‟s descriptor or handle . 
Starts from 1. The first socket opened 
will have a socket descriptor of 1.  
This should be used as an input for 
commands where socket descriptor is 
an input parameter. Example - 
RSI_Send_Socket_Close, 
RSI_Socket_Send 
uSocketType 
Type of the created socket. 
0 – TCP Client 
1 – UDP Client 
2 – TCP Server (Listening TCP) 
3- Multicast socket 
4 – Listening UDP 
stLocalAddress 
The local IP address and the port 
number on which the socket is 
created. 
uErrorCode 
0 – Success 
-2: Socket not available. A maximum 
of 8 sockets can be operational at a 
time. If creation of more than 8 
sockets is attempted, then this error is 
issued 
-95: ARP request failed 
-121 : Error issued when trying to 
connect to non-existent TCP server 
socket in remote terminal 
-123: Invalid socket parameters 
(if invalid parameters are given 
like, source port number 0, 
destination IP starts with 224 










