Old Wiki:EVEmu - Client connection brief

From EVEmu Wiki
Revision as of 16:21, 3 April 2021 by Admin (talk | contribs) (Bot: Automated import of articles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • TCP Server is started (evemu_server.cpp - 374)
  • TCP Connection is poped from connections list (evemu_server.cpp - 381)
  • Client is created (evemu_server.cpp - 383)
    • In client's constructor the EVESession object is created (Client.cpp - 43)
    • EVESession::Reset() is called to start the handshake (Client.cpp - 69)
      • Handshake occurs (if you want details visit EVESession.cpp)
      • After a successful handshake mPacketHandler defaults to _HandlePacket (EVESession.cpp - 215)
  • Client is added to sEntityList (evemu_server.cpp - 385)
  • sEntityList.Process() gets called (evemu_server.cpp - 388)
    • active_client.ProcessNet() (Client::ProcessNet()) gets called (EntityList.cpp - 74)
    • Client starts to pop packets from the queue in ProcessNet() (Client.cpp - 120)
    • EVEPktDispatch::DispatchPacket gets called with the contents of the poped packet (Client.cpp - 129)
    • Packet gets it's type checked and gets transferred to it's corresponding Handle_* function

We continue with an example of a Call_Req packet type

  • Client::Handle_CallReq is called (EVEPktDispatch.cpp - 93)(virtual calls - hard to follow - YUCK!!!)
    • Destination service is checked if it exists in the packet (Client.cpp - 1716)
    • We get hold of the destination service reference (Client.cpp - 1742)
    • Arguments are constructed from packet (Client.cpp - 1761)
    • Packet gets handled by it's appropriate service and the results are grabbed (Client.cpp - 1764)
    • We send a session change notification (Client.cpp - 1766)
    • We send call response back to the client with (Client.cpp - 1767)