Exemple #1
0
        private static void HandleClientRequest(TcpClient client)
        {
            NetworkStream stream = client.GetStream();

            // read
            TransferObj to = GetObject(stream);

            switch (to.Action)
            {
            case "LOGIN": {
                HandleLogin(to, stream);
                break;
            }

            case "ADD_PERSON": HandleAddPerson(to, stream);
                break;
            }

            // respond


            // close connection
            client.Close();
        }