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

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

how to get IP address?
hey guys,

i have this code which is supposed to get me the IP address of my site visitors:

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: blog:edit_all,delete_all|users:edit_all,delete_

Count of reciepients in php mailer
How can i sent a mail to large no of reciepients say 10,00,00 Using PHP MAILER

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and

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