29 lines
917 B
C#
29 lines
917 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Net.Sockets;
|
|
using System.Net;
|
|
using BlubbFish.Utils;
|
|
|
|
namespace NetMonitorServer {
|
|
abstract class ActionClass : OwnObject {
|
|
protected UdpClient outputNetworkStream;
|
|
protected IPEndPoint outputNetworkPort;
|
|
internal void SetAnswerStream(UdpClient udpClient, IPEndPoint iPEndPoint) {
|
|
this.outputNetworkStream = udpClient;
|
|
this.outputNetworkPort = iPEndPoint;
|
|
}
|
|
|
|
abstract internal bool Run(Queue<string> arguments);
|
|
|
|
protected void sendMessage(string message) {
|
|
this.addLog("ActionClass.sendMessage", "Nachricht geantwortet: "+message, LogLevel.Notice);
|
|
byte[] answ = Encoding.UTF8.GetBytes(message);
|
|
outputNetworkStream.Send(answ, answ.Length, outputNetworkPort);
|
|
}
|
|
|
|
protected ServerModel Model = ServerModel.Instance;
|
|
}
|
|
}
|