Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Program Socket Communication takes too long time receiving a message from client  RSS feed

 
Fernando Skackauskas
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have a program communication via socket. The program waits for multiple clients, receive the message from each client and then responds and wait for another client. bellow the code:



The problem is that: between a client and another, the program takes around two minutes to process. Even the client send a message immediately.

The command:



stay too long time to processing.

Only after this time (2 minutes or more) the client gets the message.

What I am doing wrong?

Thanks

Fernando
 
Ron McLeod
Saloon Keeper
Posts: 1430
207
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To begin with - your code as posted doesn't compile.

I cleaned-up the code and ran it with three clients connected simultaneously and didn't experience the behaviour that you described.

My environment was:
   - Windows 7 64 bit
   - Java 1.8 runtime
   - netcat 64 bit client (locally connected - didn't try on different platform)

Try and post the actual code that you are running along with some details of your test environment.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!