Peer-to-peer 1. Mode: Client/server (which is what we usually call C/s mode)
2. Network connection process:
3. Namespaces to use
System.net,system.net.socket,system.system.threading
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/ Frlrfsystemwindowsformsprogressbarclasstopic.asp
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/ Frlrfsystemwindowsformsprogressbarclasstopic.asp
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/ Frlrfsystemwindowsformsprogressbarclasstopic.asp
(Please refer to MSDN for details)
4. Design principle
1. Server side: Accept the connection module, accept the information module
When starting a server-side program, start a thread to listen for the connection signal, if once received the connection signal immediately start receiving the message of the thread, at this time, there are 2 threads running, listening to the connection signal based on the client information to determine whether to start or abort the thread receiving the information.
2. Client: Send the connection request module, send the information module
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.