This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

non synchronization between client and server in socket programming...how to resolve  RSS feed

 
dbk kumar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have got a very confusing results when I run my client and server program through socket...

I have this code at the client,here the file name is printed after the System.out.println("rg2454ord"); statement....
This is very confusing...Can anyone please tell me how to achieve the synchronization...

fname=infromserver.readLine();
System.out.println(fname);
outtoserver.writeBytes("ack"+'\n');
System.out.println("rg2454ord");

and even there is mismatch between the communication...Some different lines get printed skipping some lines in between...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!