-
2 serverSocket accept( )in the same class without blocking?
Hello,
if anyone could help me with this problem i would be very thankful since i have been trying to figure it out for days.
Basically i have a main server which has 2 serversocket connections both 'listening' for data on a specific port using the 'accept()' method, then when a connection is recieved they do something.
what i have notice is that the first accept( ) blocks, so the other accept has no chance of listening for a connection until the first is finished.
I have looked at sockets channels and non bocking with them , but this all seems to complicated , Is there anyway at all to get the 2 conections to run concurrently on my current model????
thanks in advance for any help
-
-
Re: 2 serverSocket accept( )in the same class without blocking?
yes, once the connection from a client is accepted it starts off a new thread( this is true for both server sockets).
Similar Threads
-
Replies: 5
Last Post: 01-15-2006, 07:10 PM
-
By none_none in forum Java
Replies: 17
Last Post: 04-28-2005, 03:00 PM
-
By pcjose2002 in forum C++
Replies: 5
Last Post: 04-27-2005, 06:07 PM
-
Replies: 5
Last Post: 10-17-2002, 01:58 PM
-
By Shailesh C.Rathod in forum .NET
Replies: 2
Last Post: 03-13-2002, 07:53 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks