private static void HandleConnectionOK(byte[] data) { PacketBuffer buffer = new PacketBuffer(); buffer.WriteBytes(data); buffer.ReadInteger(); string msg = buffer.ReadString(); buffer.Dispose(); //Add your code you want to execute here Console.WriteLine(msg); ClientTCP.ThankYouServer(); }
static void Main(string[] args) { ClientHandleNetworkData.InitiakizeNetworkPackages(); ClientTCP.ConnectToServer(); Console.ReadKey(); }