开发者

Get port of the incoming tcp connection

how could I get the port of the client that is connecting to the c开发者_运维问答# application?


Assuming you have a System.Net.Sockets.Socket object, Type-cast its RemoteEndPoint property to an IPEndPoint and then read its Port property.


To listen on a socket, don't you need to know the port number first?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜