Author Topic: what will happen if connecting to a connected peer  (Read 904 times)

pusheax

  • Not-a-newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
what will happen if connecting to a connected peer
« on: March 05, 2013, 05:13:52 AM »
connect for 1th time

C--------------------------------------------<CONNECTED>----------------------------------->S:
got                                                                                                                                 got
[ID_CONNECTION_REQUEST_ACCEPTED]                                                           [ID_NEW_INCOMING_CONNECTION]

ok , c-to-s connection is established!
what will happend if i connect from C to S again ?
m_Client->Connect(..........);
what message id will get in C and S site ? and what will cause this messageID to be repied : ID_ALREADY_CONNECTED:

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 292
    • View Profile
    • RakNet
Re: what will happen if connecting to a connected peer
« Reply #1 on: March 08, 2013, 01:10:21 AM »
The connect call will fail if you call it on a system you are already connected to. ID_ALREADY_CONNECTED is if the other side still thinks you are connected, but your own machine does not. For example, you crashed and restarted a game client.