Exemplo n.º 1
0
        protected override void OnOpen()
        {
            Debug.WriteLine("WS Player Connected");
            SendPersistentMessages();
            JEventBus.GetDefault().Register(this);
            _player                 = PlayerManager.Instance.CreatePlayer();
            _player.Connected       = true;
            _player.PlayerWsService = this;

            var yourConnectionId = new YourConnectionIdEvent(_player);

            Send(WsMessageBuilder.CreateWsText("private", yourConnectionId));
        }
Exemplo n.º 2
0
 public void SendPrivate(object privateEventToSend)
 {
     Send(WsMessageBuilder.CreateWsText("private", privateEventToSend));
 }