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();
|
_credentials = EncryptionCredentials.Generate();
|
||||||
}
|
}
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
inner.OnServerConnected = HandleInnerServerConnected;
|
inner.OnServerConnected = HandleInnerServerConnected;
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
inner.OnServerConnectedWithAddress = HandleInnerServerConnected;
|
inner.OnServerConnectedWithAddress = HandleInnerServerConnected;
|
||||||
inner.OnServerDataReceived = HandleInnerServerDataReceived;
|
inner.OnServerDataReceived = HandleInnerServerDataReceived;
|
||||||
inner.OnServerDataSent = (connId, bytes, channel) => OnServerDataSent?.Invoke(connId, bytes, channel);
|
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()
|
public override void ServerStart()
|
||||||
{
|
{
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
wrap.OnServerConnected = OnServerConnected;
|
wrap.OnServerConnected = OnServerConnected;
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
wrap.OnServerConnectedWithAddress = OnServerConnectedWithAddress;
|
wrap.OnServerConnectedWithAddress = OnServerConnectedWithAddress;
|
||||||
wrap.OnServerDataReceived = OnServerDataReceived;
|
wrap.OnServerDataReceived = OnServerDataReceived;
|
||||||
wrap.OnServerError = OnServerError;
|
wrap.OnServerError = OnServerError;
|
||||||
|
@ -42,7 +42,9 @@ public override void ClientConnect(string address)
|
|||||||
public override bool ServerActive() => inner.ServerActive();
|
public override bool ServerActive() => inner.ServerActive();
|
||||||
public override void ServerStart()
|
public override void ServerStart()
|
||||||
{
|
{
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
inner.OnServerConnected = OnServerConnected;
|
inner.OnServerConnected = OnServerConnected;
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
inner.OnServerConnectedWithAddress = OnServerConnectedWithAddress;
|
inner.OnServerConnectedWithAddress = OnServerConnectedWithAddress;
|
||||||
inner.OnServerDataReceived = OnServerDataReceived;
|
inner.OnServerDataReceived = OnServerDataReceived;
|
||||||
inner.OnServerDisconnected = OnServerDisconnected;
|
inner.OnServerDisconnected = OnServerDisconnected;
|
||||||
|
@ -261,12 +261,14 @@ void AddServerCallbacks()
|
|||||||
int transportIndex = i;
|
int transportIndex = i;
|
||||||
Transport transport = transports[i];
|
Transport transport = transports[i];
|
||||||
|
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
transport.OnServerConnected = (originalConnectionId =>
|
transport.OnServerConnected = (originalConnectionId =>
|
||||||
{
|
{
|
||||||
// invoke Multiplex event with multiplexed connectionId
|
// invoke Multiplex event with multiplexed connectionId
|
||||||
int multiplexedId = AddToLookup(originalConnectionId, transportIndex);
|
int multiplexedId = AddToLookup(originalConnectionId, transportIndex);
|
||||||
OnServerConnected.Invoke(multiplexedId);
|
OnServerConnected.Invoke(multiplexedId);
|
||||||
});
|
});
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
|
|
||||||
transport.OnServerConnectedWithAddress = (originalConnectionId, address) =>
|
transport.OnServerConnectedWithAddress = (originalConnectionId, address) =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user