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

How to create a static html menu from a database
Hi,

I have built a small cms which allows me to create simple html pages and then upload them

Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",

substr(I_NAME, IN

Newb advice
Hi all,

I'm a flash front end designer and I've taken on a project that needs some back end p

pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am hav

There was a problem with the request. (Code: 0)
Any Idea what could cause this? I get it randomly at best. But with both IE and FF. It derives from

cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8
Because

background color imagefill
Hello

I would like to ask you why I see this square in red color just in my local xampp insta

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to

Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.

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