Thread: Cached C#
View Single Post
Old 28.10.2007, 22:00   #6
bvmster
Guest
 
Posts: n/a
Default Cached C#

NC.ToolNet.Net.Client.CLTSocket sock = new NC.ToolNet.Net.Client.CLTSocket();


Packer p = new Packer((byte)0);

p.AddInt32(5);

p.AddInt32(222);

p.AddString("admin");


byte[] sourceArray = p.ToArray();

int num = sourceArray.Length - 1;

byte[] destinationArray = new byte[num + 3];

destinationArray[0] = (byte)(num & 0xff);

destinationArray[1] = (byte)((num & 0xff00) >> Cool;

Array.Copy(sourceArray, 0, destinationArray, 2, sourceArray.Length);


//GetStream().Write(destinationArray, 0, destinationArray.Length);

//GetStream().Flush();


System.Net.Sockets.TcpClient cliente = new System.Net.Sockets.TcpClient();


cliente.Connect("localhost", 2012);


if (cliente.Connected)

{

Console.WriteLine("Conected...");


//System.IO.StreamWriter sw = new StreamWriter(cliente.GetStream());


//sw.Write(destinationArray, 0, destinationArray.Length);

cliente.GetStream().Write(destinationArray, 0, destinationArray.Length);


cliente.Close();

}


Console.ReadLine();

}


Don't works Sad((

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 29 October 2007. Открыть источник.