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)

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

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

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

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make yo

PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

VAT
how should I deal with VAT?

if I have a product that costs £5.00 and VAT @ 17.5% (£0.87

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