I would like to ask a question about server-client applications using a ServerSocket
in Java. It is going to be a long question, but if somebody can help me in this big homework of mine, I would really appreciate it. :)
Some time ago, I wrote a program using Netbeans which connects the 2 or more JFrame clients to the server JFrame, and allows all these windows to communicate with each other by sending text to the server. This is a brief example of how it works.
I run the server application, server opens. I run the client application, more than once, lets just say 3 and A
, B
, C
are these different frames which run totally independent from each other. For example the user at C
frame sends a text to talk with other frames. Text goes from C
To Server
, then Server
sends the same text to A
, B
and C
; and this message is visible from the users' frames.
THE QUESTION IS, I am kinda rookie in this Networking and I did this in Only ONE Computer. But as expected, I must be able to do this in several computers. But I don't know how to do it.
Any help is really appreciated, thank you all. :)
只要计算机位于同一局域网中,并且您连接到服务器的相应IP,它就可以正常工作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.