Terminal Klasse entfernt
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
private Terminal Term;
|
||||
private Receiver Rec;
|
||||
private Sender Send;
|
||||
private Thread SenderThread;
|
||||
@@ -17,7 +17,6 @@ public class Program
|
||||
|
||||
public Program ()
|
||||
{
|
||||
Term = new Terminal ();
|
||||
TcpClient client = new TcpClient ("localhost", 9999);
|
||||
Rec = new Receiver (client);
|
||||
Send = new Sender (client);
|
||||
@@ -36,16 +35,15 @@ public class Program
|
||||
string line;
|
||||
while ((line = Rec.Receive()) != null)
|
||||
{
|
||||
Term.PrintLine(line);
|
||||
Console.WriteLine(line);
|
||||
}
|
||||
SenderThread.Abort();
|
||||
Term.Close();
|
||||
}
|
||||
|
||||
public void doSend ()
|
||||
{
|
||||
while (true) {
|
||||
Send.Send(Term.ReadLine());
|
||||
Send.Send(Console.ReadLine());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user