KLFServer.ServerClient.asyncReceive C# (CSharp) 메소드

asyncReceive() 개인적인 메소드

private asyncReceive ( IAsyncResult result ) : void
result IAsyncResult
리턴 void
        private void asyncReceive(IAsyncResult result)
        {
            try
            {
                int read = tcpClient.GetStream().EndRead(result);

                if (read > 0)
                {
                    receiveIndex += read;

                    updateReceiveTimestamp();
                    handleReceive();
                }

                tcpClient.GetStream().BeginRead(
                    receiveBuffer,
                    receiveIndex,
                    receiveBuffer.Length - receiveIndex,
                    asyncReceive,
                    receiveBuffer);
            }
            catch (InvalidOperationException)
            {
            }
            catch (System.IO.IOException)
            {
            }
            catch (ThreadAbortException)
            {
            }
            catch (Exception e)
            {
                parent.passExceptionToMain(e);
            }
        }