mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Transport.ServerStartWebsockets wrapper
This commit is contained in:
parent
8c5dd5c332
commit
a2579dc7a8
@ -123,8 +123,8 @@ static internal bool InternalListen(string ipAddress, int serverPort, int maxCon
|
||||
|
||||
if (s_UseWebSockets)
|
||||
{
|
||||
// TODO
|
||||
Debug.LogWarning("TODO Transport.StartWebGL?");
|
||||
Transport.layer.ServerStartWebsockets(ipAddress, serverPort, maxConnections);
|
||||
s_ServerHostId = 0; // so it doesn't return false
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ public interface TransportLayer
|
||||
// server
|
||||
bool ServerActive();
|
||||
void ServerStart(string address, int port, int maxConnections);
|
||||
void ServerStartWebsockets(string address, int port, int maxConnections);
|
||||
bool ServerSend(int connectionId, byte[] data);
|
||||
bool ServerGetNextMessage(out int connectionId, out TransportEvent transportEvent, out byte[] data);
|
||||
bool GetConnectionInfo(int connectionId, out string address);
|
||||
|
@ -55,6 +55,10 @@ public bool ClientGetNextMessage(out TransportEvent transportEvent, out byte[] d
|
||||
// server
|
||||
public bool ServerActive() { return server.Active; }
|
||||
public void ServerStart(string address, int port, int maxConnections) { server.Start(port, maxConnections); }
|
||||
public void ServerStartWebsockets(string address, int port, int maxConnections)
|
||||
{
|
||||
Debug.LogWarning("TelepathyTransport.ServerStartWebsockets not implemented yet!");
|
||||
}
|
||||
public bool ServerSend(int connectionId, byte[] data) { return server.Send(connectionId, data); }
|
||||
public bool ServerGetNextMessage(out int connectionId, out TransportEvent transportEvent, out byte[] data)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user