Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamWriter"/> class.
 /// </summary>
 /// <param name="stream">The stream to write to.</param>
 public StreamWriter(Stream stream)
 {
     _stream       = stream;
     _writerThread = new WorkerThread(RunWriter);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Server"/> class.
 /// The server is running until disposed.
 /// </summary>
 public Server()
 {
     _listener = CreateListener(Port);
     _listener.Start();
     _listenerThread = new WorkerThread(RunListener);
 }