Пример #1
0
        void m_TerminalClient_Connected(Socket socket)
        {
            m_terminal.SendMessage("Hello There");

            cmdConnect.Enabled = false;
            cmdClose.Enabled   = true;
            PublishMessage(listLog, "Connection Opened!");

            m_terminal.StartListen();
            PublishMessage(listLog, "Start listening to server messages");
        }
Пример #2
0
        void m_TerminalClient_Connected(Socket socket)
        {
            byte[] buffer = ConvertStrToBytes("Hello There");
            m_ClientTerminal.SendMessage(buffer);

            cmdConnect.Enabled = false;
            cmdClose.Enabled   = true;
            PublishMessage(listLog, "Connection Opened!");

            m_ClientTerminal.StartListen();
            PublishMessage(listLog, "Start listening to server messages");
        }
        void m_TerminalClient_Connected(Socket socket)
        {
            SimpleMessage message = new SimpleMessage("Hello There");

            int messageKing = (int)MessageKind.Simple;

            byte[] buffer = MessageComposer.Serialize(messageKing, message);

            m_ClientTerminal.SendMessage(buffer);

            cmdConnect.Enabled = false;
            cmdClose.Enabled   = true;
            PresentMessage(listLog, "Connection Opened!");

            m_ClientTerminal.StartListen();
            PresentMessage(listLog, "Start listening to server messages");
        }