Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Web sockets, Controlling web sockets

views
     
TSanonymous105 P
post Sep 23 2022, 08:06 PM, updated 4y ago

New Member
*
Probation
1 posts

Joined: Sep 2022
How best to control this web sockets? Will ordinary Java and Java Script be sufficient? We have to program for ourselves from scratch yes or no, since I found few topics covering web sockets for example Coursera only less than 5, Codeacademy perhaps 20, same for Udemy.
techm
post Sep 23 2022, 08:19 PM

Getting Started
**
Junior Member
123 posts

Joined: Nov 2007
There are many example on the web if you google.

On client-side (browser) javascript, it's quite easy. Just look up some tutorial on how to do this. It's just plain JS.

On server side, you can implement it in whatever language you want (Java if you so like), but you'll want to use the appropriate libraries out there to implement the ws server, since writing a websocket & http server from scratch isn't a trivial thing.

This post has been edited by techm: Sep 23 2022, 08:19 PM
jibpek
post Sep 23 2022, 08:56 PM

Enthusiast
*****
Junior Member
711 posts

Joined: Jul 2012
Use socket.io.

Underlaying, web socket is just HTTP but keep the port opening for 2 way communication
silverhawk
post Oct 3 2022, 06:12 PM

Eyes on Target
Group Icon
Elite
4,956 posts

Joined: Jan 2003


QUOTE(jibpek @ Sep 23 2022, 08:56 PM)
Use socket.io.

Underlaying, web socket is just HTTP but keep the port opening for 2 way communication
*
HTTP is only used to establish the connection, underlying it is TCP, not HTTP.

 

Change to:
| Lo-Fi Version
0.0128sec    1.63    5 queries    GZIP Disabled
Time is now: 24th December 2025 - 11:05 PM