Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Questions about networking API [SOLVED]  (Read 3229 times)

0 Members and 2 Guests are viewing this topic.

WiltedChameleon

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • Email
Questions about networking API [SOLVED]
« on: June 02, 2012, 10:02:22 pm »
EDIT

Solved my problem, which was because I was accidentally misusing  and the question (Lots of small packets or one big one) I just decided to use medium sized ones, since it seems to have the best of both worlds. I'll probably split each thing up and give it a packet (Ex one for the map changes, one for entities, etc)

The reason it was going wrong was because I was disconnecting a client that had already been disconnected. I have no idea what I was thinking at the time ^_^, and a second reason was I was trying to move something while iterating on it. ¬_¬
                                                        client.disconnect();
                                                        networkSelector.remove(client);
                                                        clients.remove(&client);

Was my code. I then removed first line and modified the removing system clients and it seems to be flawless with connection and disconnection.

Sorry for posting since I ended up solving it myself.
« Last Edit: June 04, 2012, 07:44:25 pm by WiltedChameleon »

 

anything