Sexchatsechat java app Kannada chat
Figure 1: Example result After the user type’s text into the input region and hits Return, the text is transmitted to the server.
The server echoes back everything that is sent by the client.
The client displays everything received from the server in the output region.
When multiple clients connect to one server, we have a simple chat system.
When a client requests to chat with another client it looks for that user's username in the Hash Map and if the other client agrees to chat then it connects the sockets.
I'm not sure how to implement this and also my program only takes one input from the user and returns it from the Server and after that it stops I have no idea why.
See your article appearing on the Geeksfor Geeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Hence I have separated the thread which does the reading work into Read Threadclass.
While we are using our arg(which is also a container), to store the currently user which makes it Covent.
So by adding our parameters while creating a new JChat(username, D-Class IP,port).
The chat uses TCP/IP sockets to communicate, and can be embedded easily in a Web page. It takes two command-line parameters -- the server name and the port number to connect to.
It makes a socket connection and then opens a window with a large output region and a small input region.