title: Sending an array over a socket with Java
body: <p>I have an 2-dimensional array to send over the socket
  The client is implemented so that it has 2 threads, one for rendering the swing gui and one for RECEIVING the data from server.</p>
  
  <p>The server is implemented so that it has 2 threads, one for listening to incoming request and then put the request to another thread for processing the request (communicating with client)</p>
  
  <p>Once the client interact with the swing gui, data will be constructed and sent to the server (actually, send to the thread which is in charge of processing the particular client), the server then processes the data and send back to client with a new data in an 2-dimensional array with updated information. The client can use the array to render the view.</p>
  
  <p>However, when the first time the client send data, it ok, everything is fine. But the next time, client send new data, but it still receive the old one (server data is still updating)</p>
  
  <p>I dont know if the problem is with the socket itself or the thread.</p>