User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 150
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
Structure Member
Name
Description
etc.)
-124: TCP socket open failure
-127: Socket already exists
max_segment_size
Indicates the maximum allowable TCP
data packet size
NOTE: Redpine module has total of 7 sockets for UART modules and 6
sockets for SPI modules. User must use the socket handle returned from the
socket creation commands.
Apart from these user provided sockets there are internal sockets reserved
for HTTP client,DNS client, Wireless firmware upgrade/configuration, ARP
and DHCP client.
4.10.3 Close a Socket
Description
This command closes a TCP/UDP socket. For UDP you will get socket close
response immediately from module, but for TCP it will take some time to
complete handshake.
Relevance
This command is relevant only when the TCP/IP stack is enabled.
Frame Body
The following is the structure of the Close command.
struct TCP_CNFG_Close
{
UINT16 uSocketDescriptor;
};
Structure Member
Name
Description
uSocketDescriptor
Socket descriptor to be closed
Response
The following is the data structure of the close response.
struct TCP_EVT_Close