Projektdatei committed
This commit is contained in:
21
src/Sender.cs
Normal file
21
src/Sender.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
public class Sender
|
||||
{
|
||||
private TcpClient Client;
|
||||
|
||||
public Sender (TcpClient client)
|
||||
{
|
||||
this.Client = client;
|
||||
}
|
||||
|
||||
public void Send (String message)
|
||||
{
|
||||
StreamWriter writer = new StreamWriter(Client.GetStream());
|
||||
writer.WriteLine(message);
|
||||
writer.Flush();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user