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

csocket - connect() needs to have a timeout mechanism (for TCP-connection drop) #10

Open
uhurden opened this issue Jul 3, 2014 · 0 comments

Comments

@uhurden
Copy link

uhurden commented Jul 3, 2014

Hi cybergarage,

I have been using cyberlink in iOS project for a while, and I noticed in some networks I have issue with device discovery.
I narrowed down an issues and found that after parsing SSD-header, when ssdp listener thread is trying to retrieve a device description it just blocks on connect, in the case when TCP-connection gets dropped on RST.
So I think you should also has a timeout mechanism on connect().

(I resolved it by setting a socket to non-blocking mode, then using select() with timeout, and after select returns, setting the socket back to blocking mode)

@uhurden uhurden changed the title (Description retrieval error): Connection reset by peer. csocket - connect() needs to have a timeout mechanism (for TCP-connection drop) Jul 4, 2014
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

No branches or pull requests

1 participant