fix(MultiplexTransport) Implement OnServerConnectedWithAddress

This commit is contained in:
MrGadget 2024-07-11 09:32:02 -04:00
parent 76d83aa998
commit ac3007fd1b

View File

@ -268,6 +268,13 @@ void AddServerCallbacks()
OnServerConnected.Invoke(multiplexedId);
});
transport.OnServerConnectedWithAddress = (originalConnectionId, address) =>
{
// invoke Multiplex event with multiplexed connectionId
int multiplexedId = AddToLookup(originalConnectionId, transportIndex);
OnServerConnectedWithAddress.Invoke(multiplexedId, address);
};
transport.OnServerDataReceived = (originalConnectionId, data, channel) =>
{
// invoke Multiplex event with multiplexed connectionId