예제 #1
0
        public void Leave()
        {
            var cmd   = new LeaveRequest();
            var proto = BinaryProcolHelper <LeaveRequest> .GetProtocol(cmd);

            _tcp.SendData(proto);
        }
예제 #2
0
        public void GetUsersInGame(string name)
        {
            var cmd = new GetUsersInGame {
                GameName = name
            };
            var proto = BinaryProcolHelper <GetUsersInGame> .GetProtocol(cmd);

            _tcp.SendData(proto);
        }
예제 #3
0
        public void JoinGame(string name)
        {
            var cmd = new JoinRequest {
                GameName = name
            };
            var proto = BinaryProcolHelper <JoinRequest> .GetProtocol(cmd);

            _tcp.SendData(proto);
        }
예제 #4
0
        public void SendToGame(string gameName, ProtocolBase <byte> command)
        {
            var cmd = new SendToGameUsers()
            {
                Message = "Hello"
            };
            var proto = BinaryProcolHelper <SendToGameUsers> .GetProtocol(cmd);

            _tcp.SendData(proto);
        }