3

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.

Emil Vikström
92.3k17 gold badges144 silver badges178 bronze badges
asked Feb 18, 2014 at 13:59

1 Answer 1

1

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.

answered Feb 18, 2014 at 14:11
Sign up to request clarification or add additional context in comments.

1 Comment

Additionally, Wildfly already contains JSR 356 (Java API for WebSocket) implementation, so you can just use what the container provides.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.