端口签名到udp,tcp [英] Port signing to udp, tcp
本文介绍了端口签名到udp,tcp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.我想找到免费端口nr,以分配给我udp和tcp客户端.我想用代码做到这一点.
问题:什么名称空间,类具有此功能?您有代码示例吗?
最好的问候Per
Hi. I want to find free ports nr for assigning to me udp and tcp clients. I want to do this with code.
Question: what namespace, class has this ability? Do you have a code sample?
Best regards Per
推荐答案
免费端口是什么意思?基本上建立连接的系统调用可以完成这项工作.
What do you mean free ports? Basically system calls which establish connection do this work.
我的意思是.端口可以被其他进程占用.如果您对端口进行硬编码,可以说它已经被其他进程调用了8000.所以在寻找可用的端口.
I mean. ports can be occupied by other proceses. if you hardcode a port, lets say 8000 it maybe already invoked by an other process. so a´m looking for available ports.
这篇关于端口签名到udp,tcp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文