Jared
Mon May 24 14:47:09 CDT 2004
Sorry. Didn't read the documentation close enough. Apparently the
TcpClient.Client property is protected. You can try sub classing TcpClient
to get to the Client property. Outside of reflection I don't see another
way to get to that property.
--
Jared Parson [MSFT]
jaredpar@online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"C# Learner" <csharp@learner.here> wrote in message
news:uMqtpbcQEHA.3012@tk2msftngp13.phx.gbl...
> Jared Parsons [MSFT] wrote:
>
> > Try
> > Socket s = tcpClient.Client;
> > IPEndPoint ep = s.RemoteEndPoint as IPEndPoint;
> > IPAddress address = ep.Address
>
> Hi Jared,
>
> 'Client' doesn't appear to be a property of 'TcpClient'. What is
> 'tcpClient' an instance of in the above code?
>
> Thanks.