net/tcp: add a member to record the current receiving window
Change-Id: Ic4c46d643a905fdd3a828e563eab4814da70dbe5 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
794a6ec23d
commit
881dd9d62d
@ -263,6 +263,10 @@ static int sixlowpan_tcp_header(FAR struct tcp_conn_s *conn,
|
||||
|
||||
ipv6tcp->tcp.wnd[0] = recvwndo >> 8;
|
||||
ipv6tcp->tcp.wnd[1] = recvwndo & 0xff;
|
||||
|
||||
/* Update the Receiver Window */
|
||||
|
||||
conn->rcv_wnd = recvwndo;
|
||||
}
|
||||
|
||||
/* Calculate TCP checksum. */
|
||||
|
@ -194,6 +194,7 @@ struct tcp_conn_s
|
||||
* connection */
|
||||
uint16_t snd_wnd; /* Sequence and acknowledgement numbers of last
|
||||
* window update */
|
||||
uint16_t rcv_wnd; /* Receiver window available */
|
||||
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
|
||||
uint32_t tx_unacked; /* Number bytes sent but not yet ACKed */
|
||||
#else
|
||||
|
@ -366,6 +366,10 @@ static void tcp_sendcommon(FAR struct net_driver_s *dev,
|
||||
|
||||
tcp->wnd[0] = recvwndo >> 8;
|
||||
tcp->wnd[1] = recvwndo & 0xff;
|
||||
|
||||
/* Update the Receiver Window */
|
||||
|
||||
conn->rcv_wnd = recvwndo;
|
||||
}
|
||||
|
||||
/* Finish the IP portion of the message and calculate checksums */
|
||||
|
Loading…
Reference in New Issue
Block a user