Download the freechat2.0 project:/files/bearocean/freechat2.0.rar
The architecture was changed on the basis of 1.0, and now it is almost completely different.
Separate multiple function modules. It also adds the compression function to the data transmitted over the network.
Data is uploaded to the server and then decompressed and parsed by the corresponding module.
Classes involved include:
Freechatbaseform
Freechatlistener
Freechatmainform
Freechatmemberlist
Freechatmessage
Freechatsender
A detailed explanation of these classes can be found in: http://bearocean.cnblogs.com/archive/2006/01/26/323628.html.
However, there are still several issues to be resolved:
(1) file transmission is not available for the moment, because I want to design it, users can drag any file to the message input box, click the send button, a prompt box will pop up on the target side, let the user select the storage path. This is a drag-and-drop message Involving RichTextBox. However, no message can be used to obtain the path of the drag-and-drop file, so there is no way to get the byte stream of the file.
(2) I tried many methods, and I cannot allow freechat to automatically scroll to the end of the scorllbar after receiving the message. This is personally considered to be related to the focus acquisition of RichTextBox.
The strange thing is that textbox uses appendtext and can automatically roll the background without additional code.
You can download the project documentation and executable programs at the beginning.
Related essays:
Freechat (Beta): http://bearocean.cnblogs.com/archive/2006/01/18/319310.html
Freechat (1.0): http://bearocean.cnblogs.com/archive/2006/01/19/320510.html
Freechat (2.0) architecture: http://bearocean.cnblogs.com/archive/2006/01/26/323628.html
This program will continue to be written. As an exercise.