View Single Post
  #4 (permalink)  
Old 10-03-2008, 05:48 PM
kellaw kellaw is offline
Member
 
Join Date: Oct 2008
Posts: 24
kellaw is on a distinguished road
Nicholas parsing it into string wouldn't work as the 2 garbage number I get is at random and the number changes as i executes them several times.

Norm - here's the mapping table with the line number involved. Sorry I have to put it into codes so it shows the correct formatting of the table


Code:
|Server |Client 1 |Client 2 | |socket1 accept L66|connect L203->729 | | Client 1 connected and server sends the session no of 1 to client 1 |writeInt(1) L77 |readInt() L206 | | Client 1 selected multiplayer and show moves as on then start game. Client 1 sends int 2 to server to denote its multiplayer. |readInt() L83 |writeInt(2) L340 | | Client 1 sends int 1 to server to denote showing moves is on. |readInt() L116 |writeInt(1) L352 | | Server receives int 99 from client 1 as test and shows properly on the server’s console |readInt() L124 |writeInt(99) L356 | | #Problem starts here - Server writes int 99 to client 1(should be successful since the println after that did get printed) but client 1 doesn’t display it. It waits for client 2 to start and executed till the same place before it displays the garbage |writeInt(99) L127 |readInt() L358 | | ========================================================== Client 1 waits for server to get a message which never reach because of the previous problem while Client 2 starts up at this point |socket2accept L132| |connect L203->729 | Client 2 connected and server sends the session no of 2 to client 2 |writeInt(2) L136 | |readInt() L206 | Server sends int 1 to client 2 to denote showing of moves |writeInt(1) L140 | |readInt() L210 | Client 2 selects multiplayer(single is disabled) and clicks on start game. Server receives int 2 from client 2 to denote multiplayer |readInt() L154 | |writeInt(2) L340 | Server receives the test int 99 and prints it properly |readInt() L158 | |writeInt(99) L356 | *Problem starts now when the server sends int 99 back to client and garbage is printed again then it hangs there not accepting the message which the server sends at line 175 & 177 |writeInt(99) L161 | |readInt() L358 |
EDITED THE TABLE

Last edited by kellaw : 10-03-2008 at 05:59 PM.
Reply With Quote