Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket Timeout Value? #160

Open
ikshwa opened this issue Aug 19, 2019 · 1 comment

Comments

@ikshwa
Copy link

commented Aug 19, 2019

What OS?

  • Windows 10

Description of issue

Can you please tell how the TCP socket parameter/ timeout and retry logic, if possible?
Currently , I am working on a software which connects with server and send some strings. But it get hangs up when device is sleeping except I send with packet sender. Thus I am eager to see what exactly I am missing to make connection that packet sender doing.
Any help would be appreciated.
Thanks
{{replace this}}

@dannagle dannagle self-assigned this Aug 19, 2019

@dannagle

This comment has been minimized.

Copy link
Owner

commented Aug 19, 2019

Packet Sender has special logic to continue reading as long as the device continues to send data. There are also various settings Packet Sender supports such as delay-before-send, and delay-before-read. Embedded devices can be very slow to respond once connected. My advice is to place random delays between each step and keep reading until you get something.

The bulk of Packet Sender's TCP logic is inside tcpthread.ccp
https://github.com/dannagle/PacketSender/blob/master/src/tcpthread.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.