10
非常簡單的問題。爲什麼剛剛連接的客戶端沒有收到任何消息,但所有其他客戶端都收到了廣播?發送連接消息的客戶端的正確方式是什麼?SignalR OnConnected - 發送連接的客戶端消息
protected override void OnConnected(HttpContextBase context, string clientId)
{
GameAction message = new GameAction();
message.text = "Player connected";
Connection.Broadcast(serializer.Serialize(message));
GameAction gamestate = new GameAction();
gamestate.text = "Some client specific info";
Send(clientId, serializer.Serialize(gamestate));
}