English 中文(简体)
曼 谷 我只接受Lan和因特网的联系,听取INADDR_ANY
原标题:Can I accept connection from both Lan and Internet only listen on INADDR_ANY

我写了GateServer,以孤立Lan和因特网,Gateserver接受双方的连接和路线包装。 Suppose if in Lan, PC assigned address 10.0.0.40 and assigned 202.xxx.xxxxx.xxx on Internet,Can I onlylect on INADDR_ANY to recv data from bothside?

最佳回答

是的。 然而,由于你在网络之间走了自己的路,如果你制作单独的听记本,只受局域网IP约束,而其他只受互联网IP约束,那么你逻辑就会更容易管理。 这样,如果贵国的法典得到新的联系,它就会确切知道它是局域网客户还是互联网客户。 如果你只听从两个执行伙伴的一张记本,那么你必须人工确定每个联系点是什么网络。

问题回答

暂无回答




相关问题
Max Outgoing Socket Connections in .NET/Windows Server

I have a slightly unusual situation where I m needing to maintain CLIENT tcp connections to another server for thousands of mobile users on my servers (basically the mobile devices connect to my ...

Determine the remaining TTL of a multicast packet in Java

If I have a Java program that listens to multicast data, how can I tell what the remaining TTL of the incoming datagram is? I know how to set the TTL on the sending multicast socket, but I want to ...

Python socket not receiving anything

I m trying to receive a variable length stream from a camera with python, but get weird behaviour. This is Python 2.6.4 (r264:75706) on linux(Ubuntu 9.10) The message is supposed to come with a ...

Connecting to a Source game server in VB.NET

I m developing an application that detects Source-based games running on the LAN. Following up on the specifications provided by Valve, I have it narrowed down to exactly what I want: making a UDP ...

What can cause select to block in Python?

Here s a snippet of code I m using in a loop: while True: print loop rlist, wlist, xlist = select.select(readers, [], [], TIMEOUT) print selected # do stuff At a certain point, ...

Socket.UseOnlyOverlappedIO?

Does anyone know what Socket.UseOnlyOverlappedIO does, and if so, does it affect performance? There seems to be no real explanation on MSDN. Thanks in advance.

热门标签