NodeNetAsync.Net.TcpServer.HandleClientInternal C# (CSharp) Method

HandleClientInternal() private method

private HandleClientInternal ( TcpSocket Socket ) : System.Threading.Tasks.Task
Socket TcpSocket
return System.Threading.Tasks.Task
		async private Task HandleClientInternal(TcpSocket Socket)
		{
			if (HandleClient != null)
			{
				if (CatchExceptions)
				{
					Exception YieldedException = null;

					try
					{
						await HandleClient(Socket);
					}
					catch (IOException)
					{
					}
					catch (Exception CatchedException)
					{
						YieldedException = CatchedException;
					}

					if (YieldedException != null)
					{
						await Console.Error.WriteLineAsync(String.Format("{0}", YieldedException));
					}
				}
				else
				{
					await HandleClient(Socket);
				}
			}
		}