mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix(Transports): Suppress obsolete warnings
This commit is contained in:
parent
86d8bc912c
commit
1968ef9f9b
@ -208,7 +208,9 @@ public override void ServerStart()
|
||||
{
|
||||
_credentials = EncryptionCredentials.Generate();
|
||||
}
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
inner.OnServerConnected = HandleInnerServerConnected;
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
inner.OnServerConnectedWithAddress = HandleInnerServerConnected;
|
||||
inner.OnServerDataReceived = HandleInnerServerDataReceived;
|
||||
inner.OnServerDataSent = (connId, bytes, channel) => OnServerDataSent?.Invoke(connId, bytes, channel);
|
||||
|
@ -241,7 +241,9 @@ public override void ServerSend(int connectionId, ArraySegment<byte> segment, in
|
||||
|
||||
public override void ServerStart()
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
wrap.OnServerConnected = OnServerConnected;
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
wrap.OnServerConnectedWithAddress = OnServerConnectedWithAddress;
|
||||
wrap.OnServerDataReceived = OnServerDataReceived;
|
||||
wrap.OnServerError = OnServerError;
|
||||
|
@ -42,7 +42,9 @@ public override void ClientConnect(string address)
|
||||
public override bool ServerActive() => inner.ServerActive();
|
||||
public override void ServerStart()
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
inner.OnServerConnected = OnServerConnected;
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
inner.OnServerConnectedWithAddress = OnServerConnectedWithAddress;
|
||||
inner.OnServerDataReceived = OnServerDataReceived;
|
||||
inner.OnServerDisconnected = OnServerDisconnected;
|
||||
|
@ -261,12 +261,14 @@ void AddServerCallbacks()
|
||||
int transportIndex = i;
|
||||
Transport transport = transports[i];
|
||||
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
transport.OnServerConnected = (originalConnectionId =>
|
||||
{
|
||||
// invoke Multiplex event with multiplexed connectionId
|
||||
int multiplexedId = AddToLookup(originalConnectionId, transportIndex);
|
||||
OnServerConnected.Invoke(multiplexedId);
|
||||
});
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
|
||||
transport.OnServerConnectedWithAddress = (originalConnectionId, address) =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user