mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00: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)
|
if (s_UseWebSockets)
|
||||||
{
|
{
|
||||||
// TODO
|
Transport.layer.ServerStartWebsockets(ipAddress, serverPort, maxConnections);
|
||||||
Debug.LogWarning("TODO Transport.StartWebGL?");
|
s_ServerHostId = 0; // so it doesn't return false
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ public interface TransportLayer
|
|||||||
// server
|
// server
|
||||||
bool ServerActive();
|
bool ServerActive();
|
||||||
void ServerStart(string address, int port, int maxConnections);
|
void ServerStart(string address, int port, int maxConnections);
|
||||||
|
void ServerStartWebsockets(string address, int port, int maxConnections);
|
||||||
bool ServerSend(int connectionId, byte[] data);
|
bool ServerSend(int connectionId, byte[] data);
|
||||||
bool ServerGetNextMessage(out int connectionId, out TransportEvent transportEvent, out byte[] data);
|
bool ServerGetNextMessage(out int connectionId, out TransportEvent transportEvent, out byte[] data);
|
||||||
bool GetConnectionInfo(int connectionId, out string address);
|
bool GetConnectionInfo(int connectionId, out string address);
|
||||||
|
@ -55,6 +55,10 @@ public bool ClientGetNextMessage(out TransportEvent transportEvent, out byte[] d
|
|||||||
// server
|
// server
|
||||||
public bool ServerActive() { return server.Active; }
|
public bool ServerActive() { return server.Active; }
|
||||||
public void ServerStart(string address, int port, int maxConnections) { server.Start(port, maxConnections); }
|
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 ServerSend(int connectionId, byte[] data) { return server.Send(connectionId, data); }
|
||||||
public bool ServerGetNextMessage(out int connectionId, out TransportEvent transportEvent, out byte[] data)
|
public bool ServerGetNextMessage(out int connectionId, out TransportEvent transportEvent, out byte[] data)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user