Es geht um folgende Funktion.
Bisher hab ich den Dreh in C# noch nicht ganz raus, deshalb wär ich super dankbar wenn mir das jemand "umschreiben" könnte.
Code
public void NoticeToClient(string notice)
{
string convNotice = string.Empty;
foreach (char c in notice)
{
convNotice += StringToHex(c.ToString());
convNotice += "00";
}
packet = "3667"; // OpCode
packet += "07";
packet += NumToHex(notice.Length);
packet += "00";
packet += convNotice;
buffer = ToByteArray(packet);
socket.ToClient(buffer);
packet = string.Empty;
buffer = null;
}
Alles anzeigen