public Task <SendResult> SendMessageAsync(NetworkEntityGuid entityGuid, GameServerPacketPayload payload) { //TODO: We need to make broadcasting more efficient. //We can expect it to sometimes be null. If the client disconnected in the middle of sending it a message //or something. var payloadSendService = SessionMappable[entityGuid]; if (payloadSendService == null) { return(Task.FromResult(SendResult.Error)); } return(payloadSendService.SendMessage(payload)); }