52ky 发表于 2022-9-23 08:43:10

[原创]基于C/S的聊天程序

看了一些socket的文章,恰好可以用JAVA来测试,想写一个GUI的点对点聊天程序。
所以赶了两天,断断续续,其间呈现一些小曲折,究竟写程序仍是需求耐性。
刚写好的GUI界面,由于流传输的问题,并且界面也不是很满足,所以干脆将两个写好的类删掉了。重新来写,感受好了很多。
程序其实是C/S模型的,分为服务端和客户端,如今将代码贴上来,共享一下创造经验。

(After reading some socket articles, I can test it with JAVA, and I want to write a GUI point-to-point chat program.
So after two days, intermittently, there are some small twists and turns, whether writing a program still requires patience.
The GUI interface that has just been written, due to the problem of streaming, and the interface is not very satisfactory, so the two written classes are simply deleted. Writing again, I feel a lot better.
The program is actually a C/S model, which is divided into a server and a client. Now I paste the code and share the creation experience.)




页: [1]
查看完整版本: [原创]基于C/S的聊天程序