监听正在使用的端口 [英] Listen to a port that is in use

查看:69
本文介绍了监听正在使用的端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
从其他人使用的指定端口获取IP连接程序.

如果程序使用了端口,我有什么办法可以监听该端口并在该端口上获取连接的IP?

If a port is used by a program, is there any way I can listen that port and get the connected IP on that port?

推荐答案

  1. 否,您不能在其他进程已经在侦听的端口上侦听.
  2. 但是,可以的,您可以确定该端口上当前活动的TCP/IP连接,正如您在
  1. No, you cannot listen on a port that another process is already listening on.
  2. But yes, you can determine the TCP/IP connections currently active on that port, as has been answered in your exact duplicate question (namely using netstat).

如果这不能回答您的问题,则应尝试提供更多信息,以达到您的目标.

If this doesn't answer your question, you should try to give more information what you're trying to achieve.

这篇关于监听正在使用的端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆