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); } }
public ValuesBuffer(Socket socket) { _socket = socket; _InOutStream = new InOutStream(_socket); }