For software introduction and updates, see:
Mgen object 672: TCP painting chat room
Update 1 mainly solves the problem that when the server is deployed in the Intranet environment, the client cannot directly communicate with the server because it is exposed to the Internet through NAT. Update 1 uses UPnP to penetrate NAT, so that the server deployed under Nat can directly accept requests from the public network.
The specific technical details are described in another articleArticleLecture:. Net (C #): Use UPnP to penetrate NAT to make the Intranet interface visible to the Internet. Here we mainly introduce the use of software.
After the server is deployed in the Intranet environment,ProgramThe corresponding public interface is opened in the vro through UPnP, and the program returns its own public IP address. The client directly communicates with the server through the public IP address.
If a server is directly deployed in a public network environment, the Intranet IP address is actually the same as the obtained public IP address.
Then the client can connect to the server by entering the public IP address of the server:
After the connection, you can chat and draw:
The current version of the program andSource codeDownload
Download Page
Note: This is an archive of Microsoft SkyDrive. You can directly download the file in your browser. Some download tools may not be available for download.
Sample program running environment:. NET Framework 3.0
SourceCodeEnvironment: Microsoft Visual Studio express 2012 for Windows Desktop
Note: The Source Code does not include the referenced external class library file: mgen SPA project