SafeNet/.svn/pristine/51/51e8a09c541b5113905edbc8682135b68741a43a.svn-base

38 lines
959 B
Plaintext
Raw Normal View History

2021-02-24 11:50:23 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SN_Server.ServerMSGS
{
public class SM_IPList
{
private ServerMSG _sm;
public List<ServerIdent> ipList;
public SM_IPList(ServerMSG sm)
{
_sm = sm;
ipList = new List<ServerIdent>();
DecodePayload(sm.Payload);
}
private void DecodePayload(string paylaod)
{
string[] temp = paylaod.Split('/');
foreach (string ident in temp)
{
Console.WriteLine("Got new serverIdent:" + ident);
ServerIdent si = new ServerIdent(ident);
ipList.Add(si);
}
}
public static byte[] GenRequestMsg()
{
string msg = ServerMSG.GenMsg(0x0005, ServerConnector.serialNr, "");
return System.Text.Encoding.ASCII.GetBytes(msg);
}
}
}