KLFServer.ServerClient.beginAsyncRead C# (CSharp) Method

beginAsyncRead() private method

private beginAsyncRead ( ) : void
return void
        private void beginAsyncRead()
        {
            try
            {
                if (tcpClient != null)
                {
                    currentMessageHeaderIndex = 0;
                    currentMessageDataIndex = 0;
                    receiveIndex = 0;
                    receiveHandleIndex = 0;

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