// sent from server to specific client to tell it to download a mesh public void ClientGetMesh(string address, int port, int connectionId) { ServerNetworking.SocketMessage msg = new ServerNetworking.SocketMessage(); msg.address = address; msg.port = port; NetworkServer.SendToClient(connectionId, NetworkConstants.MSG_GET_MESH, msg); }
public void OnClientClearToDownloadMesh(NetworkMessage netMsg) { ServerNetworking.SocketMessage socketMsg = netMsg.ReadMessage <ServerNetworking.SocketMessage>(); Debug.Log(socketMsg.address); OnMeshClearToDownloadEvent(socketMsg.address, socketMsg.port); }
// sent from server to all clients to tell them to download a mesh public void AllClientsGetMesh(string address, int port) { ServerNetworking.SocketMessage msg = new ServerNetworking.SocketMessage(); msg.address = address; msg.port = port; NetworkServer.SendToAll(NetworkConstants.MSG_GET_MESH, msg); }