Projektdatei committed
This commit is contained in:
21
src/Receiver.cs
Normal file
21
src/Receiver.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
|
||||
class Receiver
|
||||
{
|
||||
private TcpClient Client;
|
||||
private StreamReader Reader;
|
||||
|
||||
public Receiver (TcpClient client)
|
||||
{
|
||||
this.Client = client;
|
||||
this.Reader = new StreamReader(Client.GetStream());
|
||||
}
|
||||
|
||||
public string Receive ()
|
||||
{
|
||||
return Reader.ReadLine();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user