Beispiel #1
0
        public static void Start(object clientSocket)
        {
            Socket     socket           = (Socket)clientSocket;
            var        OperationsBuffer = new HistoryOperations();
            var        _InOutStream     = new InOutStream(socket);
            var        Buffer           = new ValuesBuffer(socket);
            IOperation currentOperation = new SaveNumberOperation();

            _InOutStream.HelpMessage();
            try
            {
                while (currentOperation.Run(Buffer, _InOutStream, OperationsBuffer, socket))
                {
                    currentOperation = _InOutStream.ReadOperation(operations);
                }
            }
            catch (Exception e) {
                Console.WriteLine(e.Message);
            }
        }
Beispiel #2
0
 public ValuesBuffer(Socket socket)
 {
     _socket      = socket;
     _InOutStream = new InOutStream(_socket);
 }