tags:

views:

37

answers:

2

Hi,

is there anyone who know that how to get client ip using socket programming while we are requesting the access of file transfering??i am using C#

thanks

+2  A: 

Socket.LocalEndPoint or Socket.RemoteEndPoint should do the trick, depending on whether you're the client or not.

Stephen Cleary
A: 

Assuming you have a TcpListener, after the AcceptSocket call you are returned a Socket. On this socket you can call RemoteEndPoint

Brian R. Bondy