Guest User

Untitled

a guest
Sep 18th, 2020
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. //
  2. // Created by armegon on 17.09.20 г..
  3. //
  4.  
  5. #include "Packet.h"
  6. #include "Protocol/ServerOpcode.h"
  7. #include <iostream>
  8.  
  9. void Packet::PreparePacket(ServerOpcode serverOpcode, std::string message) {
  10.     snprintf(header_,header_length,"%x\n",serverOpcode);
  11.     strcpy(body_, message.c_str());
  12.     strcpy(data_, header_ );
  13.     strcat(data_, body_);
  14. }
  15.  
  16. void Packet::decode_header() {
  17.  
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment