connect() succeeds but accept() does not?


Posted on 16th Feb 2014 07:03 pm by admin

Please help me with this problem. I'm working on a time-sensitive project where I'm using TCP sockets. I've got this problem where most of the time a connection cannot be made.

While debugging, I see that the connect() call on the client succeeds but on the host machine it will just be stuck on accept (or just bypass it with EWOULDBLOCK if it was set to a non-blocking socket)

Did you know?Explore Trending and Topic pages for more stories like this.
I'm not very experienced with socket programming, so I'm not sure what can cause this behavior. Also what makes it difficult to solve is that sometimes it works perfectly fine.

What are some possible reasons for this problem to occur?
No comments posted yet

Your Answer:

Login to answer
187 Like 30 Dislike
Previous forums Next forums
Other forums

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then

Hom to make one url to open together with another url
I have a chat, which i want to be opened, as soon as the users login to the site. As it is now, when

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and ov

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

Thread in PHP
Thread in PHP
Some basic use and basic code for thread in php
This is my question?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash