Closed Adyvan closed 1 year ago
@Adyvan you can handle ConnectionRequest outside library already. Just use Accept and Reject and request Data
@RevenantX your approach works only if the key is const in an app instance.
I propose a version that can use in an app that has multiple keys or one key per user
@Adyvan no, you can send any data not only text keys with Connect
call. And process this data (not only text) in OnConnectionRequest using https://revenantx.github.io/LiteNetLib/api/LiteNetLib.ConnectionRequest.html#LiteNetLib_ConnectionRequest_Data and method Accept()
and Reject()
You can do own logic this way with any keys and additional check per user.
@RevenantX now I got it thanks. my proposal does not make sense, sorry for losing your time
Feature/proposal Add a possibility to handle
ConnectionRequest.cs
outside the libJust can copy that instead method
public NetPeer AcceptIfKey(string key)
Library version: commit id (3f91b3c8ac43bfbc72701eb3e0343dfbd6ea6b80)