Meine Lösung für Aufgabenblatt 2
This commit is contained in:
24
dummyclient_manuel/Receiver.cs
Normal file
24
dummyclient_manuel/Receiver.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
|
||||
class Receiver
|
||||
{
|
||||
private StreamReader Reader;
|
||||
private Terminal Term;
|
||||
|
||||
public Receiver (NetworkStream stream, Terminal terminal)
|
||||
{
|
||||
this.Reader = new StreamReader(stream);
|
||||
this.Term = terminal;
|
||||
}
|
||||
|
||||
public void Receive ()
|
||||
{
|
||||
while (true) {
|
||||
String line = Reader.ReadLine();
|
||||
Term.PrintLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user