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, Arrays & A Lot Of Confusion
I've been doing basic PHP work on sites for a few years now, but I've never been tempted to learn ho

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

Problem with array max size.
Hi to everyone,
I've got a homework about filling a bidimensional array un spiral shape, I alre

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

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