Clone of Akilla's acserver @ https://github.com/deregtd/ACServer

PacketHeaders.h 752B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // PacketHeaders.h
  2. // Declaration of Packet realted structures common to both the client and server
  3. #pragma once
  4. #pragma pack(push,1)
  5. struct EmuHeader
  6. {
  7. enum PacketType {
  8. // Client to Server: login/pass
  9. Authenticate,
  10. // Server to Client: assign a session ID
  11. SetSession,
  12. // Client to Server: rejoin session on new node
  13. JoinSession,
  14. // Both: Terminate nicely
  15. Disconnect,
  16. // Both: Game related events
  17. Payload };
  18. // Enum PacketType
  19. BYTE type_,
  20. // Unknown message flag (priority?)
  21. message_;
  22. // Bytes in the payload
  23. WORD payloadsize_;
  24. // Session ID
  25. DWORD session_;
  26. };
  27. struct EmuAuthenticate
  28. {
  29. char username_[ 20 ],
  30. password_[ 20 ];
  31. };
  32. #pragma pack(pop)