lidgren / lidgren-network-gen3

Lidgren Network Library
https://groups.google.com/forum/#!forum/lidgren-network-gen3
MIT License
1.19k stars 331 forks source link

Is it possible to send and receive structs instead of classes ? #154

Open genaray opened 3 years ago

genaray commented 3 years ago

Well my question is pretty simple, i took a look into the documentation and saw examples on how you send and receive classes. But what about structs ? Can we send and receive those too without boxing them ?

PJB3005 commented 3 years ago

What do you mean "send classes"? The data that Lidgren takes in is NetOutgoingMessage/NetIncomingMessage which you can fill in yourself, so there should be no problem filling it in with whatever struct data you have.