mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Removed one liner braces from transport files. (#544)
This commit is contained in:
parent
73edf5e732
commit
4aa1a4b169
@ -33,9 +33,9 @@ void Awake()
|
||||
}
|
||||
|
||||
// client
|
||||
public override bool ClientConnected() { return client.Connected; }
|
||||
public override void ClientConnect(string address) { client.Connect(address, port); }
|
||||
public override bool ClientSend(int channelId, byte[] data) { return client.Send(data); }
|
||||
public override bool ClientConnected() => client.Connected;
|
||||
public override void ClientConnect(string address) => client.Connect(address, port);
|
||||
public override bool ClientSend(int channelId, byte[] data) => client.Send(data);
|
||||
|
||||
bool ProcessClientMessage()
|
||||
{
|
||||
@ -62,7 +62,7 @@ bool ProcessClientMessage()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override void ClientDisconnect() { client.Disconnect(); }
|
||||
public override void ClientDisconnect() => client.Disconnect();
|
||||
|
||||
// IMPORTANT: set script execution order to >1000 to call Transport's
|
||||
// LateUpdate after all others. Fixes race condition where
|
||||
@ -79,9 +79,9 @@ public void LateUpdate()
|
||||
}
|
||||
|
||||
// server
|
||||
public override bool ServerActive() { return server.Active; }
|
||||
public override void ServerStart() { server.Start(port); }
|
||||
public override bool ServerSend(int connectionId, int channelId, byte[] data) { return server.Send(connectionId, data); }
|
||||
public override bool ServerActive() => server.Active;
|
||||
public override void ServerStart() => server.Start(port);
|
||||
public override bool ServerSend(int connectionId, int channelId, byte[] data) => server.Send(connectionId, data);
|
||||
public bool ProcessServerMessage()
|
||||
{
|
||||
if (server.GetNextMessage(out Telepathy.Message message))
|
||||
@ -106,9 +106,9 @@ public bool ProcessServerMessage()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool ServerDisconnect(int connectionId) { return server.Disconnect(connectionId); }
|
||||
public override string ServerGetClientAddress(int connectionId) { return server.GetClientAddress(connectionId); }
|
||||
public override void ServerStop() { server.Stop(); }
|
||||
public override bool ServerDisconnect(int connectionId) => server.Disconnect(connectionId);
|
||||
public override string ServerGetClientAddress(int connectionId) => server.GetClientAddress(connectionId);
|
||||
public override void ServerStop() => server.Stop();
|
||||
|
||||
// common
|
||||
public override void Shutdown()
|
||||
|
@ -53,7 +53,7 @@ public override bool Available()
|
||||
}
|
||||
|
||||
// client
|
||||
public override bool ClientConnected() { return client.IsConnected; }
|
||||
public override bool ClientConnected() => client.IsConnected;
|
||||
|
||||
public override void ClientConnect(string host)
|
||||
{
|
||||
@ -69,10 +69,10 @@ public override void ClientConnect(string host)
|
||||
|
||||
public override bool ClientSend(int channelId, byte[] data) { client.Send(data); return true; }
|
||||
|
||||
public override void ClientDisconnect() { client.Disconnect(); }
|
||||
public override void ClientDisconnect() => client.Disconnect();
|
||||
|
||||
// server
|
||||
public override bool ServerActive() { return server.Active; }
|
||||
public override bool ServerActive() => server.Active;
|
||||
|
||||
public override void ServerStart()
|
||||
{
|
||||
@ -106,7 +106,7 @@ public override string ServerGetClientAddress(int connectionId)
|
||||
{
|
||||
return server.GetClientAddress(connectionId);
|
||||
}
|
||||
public override void ServerStop() { server.Stop(); }
|
||||
public override void ServerStop() => server.Stop();
|
||||
|
||||
// common
|
||||
public override void Shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user