예제 #1
0
        private static void RecieveCallback(IAsyncResult result)
        {
            try
            {
                int length = myStream.EndRead(result);
                if (length <= 0)
                {
                    return;
                }

                byte[] newBytes = new byte[length];
                Array.Copy(recBuffer, newBytes, length);
                ClientHandleData.HandleData(newBytes);
                myStream.BeginRead(recBuffer, 0, 4096 * 2, RecieveCallback, null);
            }
            catch (Exception)
            {
                return;
            }
        }
예제 #2
0
 public static void InitializeClient()
 {
     ClientHandleData.InitializePackets();
     ClientTCP.InitializingNetworking();
 }