简体   繁体   English

无广播的Java客户端服务器聊天应用程序

[英]Client Server Chat Application in Java without broadcasting

I am working on a school project where I have to design a client server chat application in Java using Socket programming and HTTP protocol. 我正在开展一个学校项目,我必须使用Socket编程和HTTP协议在Java中设计客户端服务器聊天应用程序。 I should ensure that the message does not get broadcasted to every client; 我应该确保消息不会被广播给每个客户; instead the message should only reach the client it is destined for. 相反,消息应该只到达它预定的客户端。 Since I am new to Socket Programming, I have been looking for some tutorials all over the internet, but all I could find was where the message gets broadcasted. 由于我是Socket Programming的新手,我一直在寻找互联网上的一些教程,但我能找到的只是消息被广播的地方。 Any help or any links to tutorials would be appreciated. 任何帮助或教程的任何链接将不胜感激。 Thank you. 谢谢。

What you need is the ability to create public/private chatrooms. 您需要的是创建公共/私人聊天室的能力。 So many others have gone into specifics. 许多其他人已经进入细节。 This should be a good starting point: 这应该是一个很好的起点:

https://www.codeproject.com/Articles/524120/A-Java-Chat-Application https://www.codeproject.com/Articles/524120/A-Java-Chat-Application

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM