Reputation: 464
I currently research WebSockets. I noticed that all tutorials are for client being web browser and server, well, being server.
It should be possible to have two servers (frontend + backend) that communicate between each other using WebSocket, right? If so, may I get some example/tutorial/page where this kind of thing is described (especially "client" side)? I cannot find this anywhere.
I use Java 1.7, server is Wildfly 8.0.
Upvotes: 3
Views: 2901
Reputation: 91983
One of them is still client and the other server, as far as the WebSocket protocol is concerned. One of them, the server, listen on a TCP port and accepts connections from clients. The other, the client, initiates a connection to the server.
These two parts can both run on server machines but it doesn't change the fact that one acts as a client to the other.
I found multiple tutorials when searching for "Java websocket client" so I don't think I need to point to one specific. Pick the library that fits your needs best.
Upvotes: 1