예제 #1
0
        void Client_TextReceived(TCPClient client, string text)
        {
            string from    = GetTagToken(text, "1");
            string command = GetTagToken(text, "2");
            string forx    = "";
            string dowhat  = "";

            if (from.ToLower() == "client" && command.ToLower() == "command")
            {
                forx   = GetTagToken(text, "3");
                dowhat = GetTagToken(text, "4");
                UpdateServerListBox("Inwards <", "client has told me to " + dowhat);
            }
            else
            {
                UpdateServerListBox("Inwards <", text);
            }
        }
예제 #2
0
 void Client_ClientConnected(TCPClient client)
 {
     ConnectedToServer = true;
     UpdateServerListBox("Inwards <", "Connected to server");
 }
예제 #3
0
 void Client_ClientDisconnected(TCPClient client, string errorMessage)
 {
     ConnectedToServer = false;
     UpdateServerListBox("Inwards <", "Disconnected from server " + errorMessage);
 }