Posted for MRARSENAL10: Xin giúp đỡ viết chương trình chat peer to peer


Thành viên VIP
Xin chào Joe,
Mình đang viết chương trình chat peer to peer , thầy hướng dẫn bảo tạo 2 luồng , 1 luồng server, 1 luồng client nhưng mình vẫn chưa rõ lắm. Mong Joe có thể gợi ý cho mình ?
Cám ơn Joe.
Correct that every web-based communication should implement with THREADS. I give you here a brief explanation about such a communication for a "Chat peer-to-peer" implementation.

- On the Server site a SERVER thread waits for ALL incoming "clients" (or chatters) and delegates every request of a client to a SERVING thread that does the communication with the client and/or handles the chats between other chatters.
- On the Client site you don't need threading because you, as a client, interact directly via the web-Chat Server with other participants. If you are a pro you can implement a threading client that can handle simultaneously different participants as if you were a person with "multiple" personalities.

Your question is a big issue and I don't want to help you privately, but only publicly in this thread. Sorry. Please study the following threads before you could raise your questions that you haven't understood.