_p2PSessionRequestCallback = Callback.Create(OnP2PSessionRequest) Private Callback _p2PSessionRequestCallback handle won't be eaten by garbage collector. Having a field will make sure that the callback How to accept the session request? It’s really easy! All you have to do is write a code like this one: // create a callback field. The process will repeat itself if you haven’t sent any data for a while (usually a couple of minutes.) You should accept only the connections you’re expecting to be made, like from another player in the lobby you’re in. P2P session request is something that occurs when you try to send the first chunk of data to the Steamworks’ client. Before client can receive your data, he has to accept your P2P session request. You cannot send the data to any Steamworks’ client that’s out there. Of course there are some security precautions. If one peer is sending the data, the other one receives it in some way.
0 Comments
Leave a Reply. |