I was doing well using one connection (one port) having a ClientServer.class i created for the purpose. I send strings between the client and server and game worked prefectly.
However, I recently discovered that when loading saves I must send objects and I started using ObjectOutputStream and ObjectInputStream for that sole reason. This only seemed to work one way!
Having
ObjectOutputStream
ObjectInputStream
on both client and server seemed to make that none of them could readObject from it. Basically, is the problem i use the same socket for sending and receiving?
Instead if I had OOS on the server side and OIS on client side it worked, not when I had OOS and OIS on both.
It worked well with DataOutputStream using the same socket for incoming and outgoing traffic. I need to create 2 connections? What am I doing wrong?