Rotur
  • Getting Started
  • Your Connection
    • What is a websocket?
    • Connecting
      • Handshake
      • SetID
      • Link
    • Authentication
      • Get User Data
      • Login
    • Rotur Designations
    • Websocket Commands
      • Global Message (gmsg)
      • Private Message (pmsg)
      • Login to rotur (auth)
  • My Account
    • Rotur Account Objects
      • originOS specific keys
    • Requesting my ofsf storage
    • Rotur Badges
    • Transactions and Taxes
  • Assorted APIs
    • rMail
    • avatars.rotur.dev
      • .banners
    • rotur.dev/auth
    • Keys
  • languages
    • RWL
      • Basics
      • Structure
      • Attributes
        • Text
        • Frame
        • Section
      • Alignments and Anchors
    • RTR
      • Basics
      • Structure
      • Functions
        • Mathematical Functions
        • String Functions
        • Array Functions
        • Object Functions
        • Logical Functions
        • Utility Functions
      • Events
      • Examples
    • RDF
  • Claw
    • What is claw
    • Api Endpoints
      • /feed
      • /post
      • /follow
      • /unfollow
      • /followers
      • /following
      • /profile
      • /delete
      • /rate
      • /following_feed
      • /reply
      • /repost
      • /top_posts
      • /search_posts
      • /search_users
  • Web Standard
    • What is this
  • Addons / Extensions
    • Basic Structure
    • Events
      • onload
      • page_load
      • page_focus
    • API
      • Classes
        • Page
          • (static) .new()
          • .getTitle()
        • URL
          • (static) .new()
          • (static) .parse()
          • .format()
          • .getAsyncData()
          • .getFetchUrl()
          • .getTitle()
    • Commands
      • redirect
      • opentab
    • Variables
      • tab_info
      • page_width / height
      • scroll_x / y
Powered by GitBook
On this page
Edit on GitHub
  1. Your Connection
  2. Connecting

Handshake

The handshake is unmodified from cl4, using the same format and same inputs. This is the first command you should send to the server.

{
  "cmd": "handshake",
  "val": {
    "language": "Javascript", // the language that you are connecting using
    "version": {
      "editorType": "Scratch", // the type of your environment
      "versionNumber": 3,
    },
  },
  "listener": "handshake_cfg",
}

Then the server should return a set of packets listed below. In the same order

{
  "cmd": "client_ip",
  "val": "" // your ip
}
{
  "cmd": "server_version", 
  "val": "0.2.0" // the version of the websocket server
}
{
  "cmd": "statuscode",
  "code": "I:100 | OK",
  "code_id": 100,
  "listener": "handshake_cfg" // handshake completed statuscode
}
PreviousConnectingNextSetID

Last updated 3 months ago