mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Serialize NWM service
This commit is contained in:
		
							parent
							
								
									571b1062f0
								
							
						
					
					
						commit
						f5e2f873b0
					
				
					 18 changed files with 82 additions and 8 deletions
				
			
		|  | @ -13,4 +13,4 @@ add_library(network STATIC | |||
| 
 | ||||
| create_target_directory_groups(network) | ||||
| 
 | ||||
| target_link_libraries(network PRIVATE common enet) | ||||
| target_link_libraries(network PRIVATE common enet Boost::boost) | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ | |||
| #include <memory> | ||||
| #include <string> | ||||
| #include <vector> | ||||
| #include <boost/serialization/access.hpp> | ||||
| #include "common/common_types.h" | ||||
| #include "network/room.h" | ||||
| 
 | ||||
|  | @ -30,6 +31,17 @@ struct WifiPacket { | |||
|     MacAddress transmitter_address; ///< Mac address of the transmitter.
 | ||||
|     MacAddress destination_address; ///< Mac address of the receiver.
 | ||||
|     u8 channel;                     ///< WiFi channel where this frame was transmitted.
 | ||||
| 
 | ||||
| private: | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int) { | ||||
|         ar& type; | ||||
|         ar& data; | ||||
|         ar& transmitter_address; | ||||
|         ar& destination_address; | ||||
|         ar& channel; | ||||
|     } | ||||
|     friend class boost::serialization::access; | ||||
| }; | ||||
| 
 | ||||
| /// Represents a chat message.
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue