I write GateServer to isolate Lan and Internet,Gateserver accept connection and route packet from both side. Suppose if in Lan, PC assigned address 10.0.0.40 and assigned 202.xxx.xxx.xxx on Internet,Can I just listen on INADDR_ANY to recv data from both side?
Can I accept connection from both Lan and Internet only listen on INADDR_ANY
155 Views Asked by emliy At
1
There are 1 best solutions below
Related Questions in SOCKETS
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- My server TCP doesn't receive messages from the client in C
- how is strncpy able to copy from source to empty destination?
- Python Multicast packet receiver stops receiving multicast packets when computer is connected to WiFi
- Python Client-Server Communication with Protocol
- Reversed TLS re-connection issue
- Android 13 & 14 seem to close WebSocket connection, if i put app in background, after ~20s
- Java SocketException: Connection reset,. What is the cause?
- Multipart/form-data with chunked data transfer (ICAP protocol)
- View Socket View
- Client connection timeout during Android & Windows PC communication via sockets
- Browser connect to raw sockets even possible?
- Protocol 43200 after unpacking received data
- Unity SocketIo using Best http2 plugin want to use in webgl
- How does pre-allocating a pool of SocketAsyncEventArgs objects upfront improve the performance of a server application in c#
Related Questions in LISTEN
- Laravel Livewire 3 dispatch not working with laravel echo private
- Android listen_call_state
- StateProvider gets updated but ref.listen does not triggers
- Flutter - missing data while socket listen
- Listening to keyboard outside node JS terminal
- How do I activate a toggle button in Tableview if I select a row using JavaFX?
- Nodejs on IIS listen port and default file issues
- Perform function after notify in postgresql
- I am getting an error in my terminal lias command not found
- i have installed npm globally, nodemon, , express aftering running my index.js file am getting error -13 and am using codesandbox its virtual IDE
- Is it possible to write a generic trigger for all tables in Postgres?
- python 'listen' creates established socket. why?
- Flutter wait for listen() function
- SQL Server - how to listen for table changes
- How to make jQuery constantly watch for event instead of onClick
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes. However, since you are doing your own routing between networks, it might make your logic easier to manage if you create separate listening sockets, one bound to only the LAN IP, and the other bound to only the Internet IP. That way, when your code receives a new connection, it will know exactly whether it is a LAN client or an Internet client. If you only listen on one socket on both IPs, you have to manually determine which network each connection comes from.