by William Keith (4 Submissions)
Category: Internet/HTML
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
This code demonstrates two things: firstly, it shows you how to get a list of network adapters, and secondly, it shows you how to bind to one of them that the user selects and connect through it. This is useful for users who have a separate internet and LAN connection, or two LAN connections, or whatever else. To test it, just run the program, and listen on a port and adapter, then type your IP followed by a colon and the port you selected into your browser's address bar and the program will return the headers the browser sent to the browser. Enjoy!
Download Allow user to select network adapter to use from a list (3 KB)