gpt4 book ai didi

networking - 为什么用 Netcat 监听端口不起作用

转载 作者:行者123 更新时间:2023-12-04 13:11:57 27 4
gpt4 key购买 nike

我在 Ubuntu 上运行以下命令:

nc -l -p 5004 -v  >> /home/anders/Dropbox/netcatFiles/test

其中包括一个让它在 5004 监听的命令。

我正在使用 VLC 向端口 5004 发送 RTP 流。当我在 Wireshark 中观察环回接口(interface)时,我注意到带有消息“无法到达目标”的 ICMP 数据包。

打开另一个 VLC 并告诉它在端口 5004 播放传入数据,一切正常,并且播放流。

我应该怎么做才能让 Netcat 监听端口 5004?

最佳答案

我认为您需要添加“-u”参数以使其监听 UDP。

默认情况下,netcat 工作在 TCP 模式,但 RTP 协议(protocol)是基于 UDP 的。

"The Transmission Control Protocol (TCP), although standardized for RTP use,[5] is not normally used in RTP application because TCP favors reliability over timeliness. Instead the majority of the RTP implementations are built on the User Datagram Protocol (UDP)"



http://en.wikipedia.org/wiki/Real-time_Transport_Protocol

关于networking - 为什么用 Netcat 监听端口不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11286170/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com