Skip to content
DanimalsTCGYT edited this page Aug 4, 2024 · 5 revisions

You can now use websockets in osl! :O

Websockets are super useful ways to send data.

What is a websocket?

All websocket methods

Example App

websocket = "echo.websocket.org:443".newWebsocket()
// setup a new websocket connection

websocket.wsSend("hi")

mainloop:
// check if there are new messages
if websocket.wsHasnew() (
  log websocket.wsGetnext()
  // log every message the program recieves
)

if websocket.wsOpen().not (
  log "websocket Disconnected"
  window "stop"
  // close app
)

originOS Wiki

Wiki Views:
:views

OSL | RSH | ICN

Clone this wiki locally