.py和.pyc文件, .pyc是.py编译后生成的byte code
Ubuntu下格式化U盘

Can two applications listen to the same port? (Stackoverflow)

kitt posted @ 2013年10月29日 11:22 in 技术类 Tech , 1206 阅读

For TCP, no. You can only have one application listening on a single port at one time.

Now if you had 2 network cards, you could have one application listen on the first IP and the second one on the second IP using the same port number.

For UDP (Multicasts), multiple applications can subscribe to the same port.

Avatar_small
依云 说:
2013年10月29日 22:25

For Linux and TCP, yes. Child processes can inherit that socket (see how Nginx does with its workers). You can also pass sockets around.

Avatar_small
kitt 说:
2013年11月01日 22:31

I don't know that. Thanks!@依云:


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter