2022/11/15更新更新了多線程功能,不過沒有完全實現。目前可以實現多個客戶端同時和服務器進行通信,不過客戶端發送的信息其他客戶端接收不到。由於這部分實現起來比較複雜,bug很多,這也只是一個課程作業,時間精力水平都有限,所以寫到這裡就只能告一段落了。希望可以幫到有需要的人~
計網作業二次元特有的廚力爆棚只是一個簡陋的課程作業,花了幾天寫完,雖然功能不多但是基本功能還是有的,將此作為模板添加自己的內容還是挺合適的,希望可以幫助到有需要的人。 該程序實現的主要功能如下: 1.TCP/UDP協議實現服務器端/客戶端通信2.自帶背景音樂,可以循環播放,也可以自由控製播放和暫停(點擊Play/Pasue,或者在文本框中單擊鍵盤上的esc鍵) 3.點擊發送按鈕/在文本框中單擊enter鍵可以發送信息,發送後文本框中內容會自動切換4.文本域透明(有進度條),可以自由設置自己喜歡的背景圖片。
This is a simle coursework, though there are only some basic functions, it can be used as a module to help you develop more personalized functions. I hope it can help you to some degree. The main functions are as follows: 1.Server/Clinet communication based on TCP and UDP. 2.You can set the background music as you wish. When the music is over, it will be played again. You can pause the music or replay it again freely, just cliked the Play/Pause button or press the ESC key on your keyboard in the input box. 3.You can send the message by clicking the "發送" button or clicking the Enter key on your keyborad. 4.The TextArea is transparent, you can set the background picture freely.