lidgren-network-gen3 icon indicating copy to clipboard operation
lidgren-network-gen3 copied to clipboard

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

Open genaray opened this issue 3 years ago • 1 comments

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 ?

genaray avatar Oct 02 '21 12:10 genaray

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.

PJB3005 avatar Oct 02 '21 14:10 PJB3005