Skip to content

Conversation

kgbook
Copy link

@kgbook kgbook commented Sep 24, 2019

Tick value is 5 second by default, timer will expire if interval betweent two request is larger than 5 seconds.

Server will close the socket if timer is expired, but Client still send HTTP request to the socket.
the length of data usingasync_read_some from the socket is 0, HTTP request from client skipped, and callback will not invoke!

It's ok if shutdown before close, so Client will receive FIN and close the socket, then start 3-way handshake.

Have tested using tcpdump and Wireshark.

boost/asio/basic_socket.hpp also recommend to shutdown before close, reference below:

@note For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant