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

Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is mos

DateTimeZone::listIdentifiers headache
http://php.net/manual/en/datetimezone.listidentifiers.php


So the documentation states tha

puting for loop in 1 value
hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

Basic Question about Threading and PHP...
I have a page that I am working on and it is taking several hours to process. The basics of what th

Get last modified date of web page
Hai All,

In php how can i get last modified date of a give web page . I have tried to g

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

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

Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can

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