Platforms to show: All Mac Windows Linux Cross-Platform

The module WebSocketHelperMBS   Deprecated

module WebSocketHelperMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
module Network MBS Network Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Helper functions for implementing web sockets.
Example:
// short packet
dim s as string = WebSocketHelperMBS.AddHeader("Hello")
dim b as Boolean = WebSocketHelperMBS.FrameMasked(s)
dim t as string = WebSocketHelperMBS.Unmask(s)

// long packet
dim text as string = "Hello World. This is just a sample text with a little bit more characters to make it at least 127 characters long for this test."
dim s2 as string = WebSocketHelperMBS.AddHeader(text)
dim b2 as Boolean = WebSocketHelperMBS.FrameMasked(s2)
dim t2 as string = WebSocketHelperMBS.Unmask(s2)

Break // look in debugger
This item is deprecated and should no longer be used.
  • method AddHeader(data as Memoryblock, opCode as Integer = 7) as Memoryblock
  • method AddHeader(data as string, opCode as Integer = 7) as string
  • method FrameMasked(data as Memoryblock) as boolean
  • method FrameMasked(data as string) as boolean
  • method Unmask(data as Memoryblock) as Memoryblock
  • method Unmask(data as Memoryblock, byref Offset as Integer, byref Length as Integer, byref TotalLength as Integer) as Memoryblock
  • method Unmask(data as string) as string
  • method Unmask(data as string, byref Offset as Integer, byref Length as Integer, byref TotalLength as Integer) as string

Opcode Values

Constant Value Description
kOpCodeBinaryFrame 2 Binary Frame
kOpCodeClose 8 Close
kOpCodeContinuation 0 Continuation
kOpCodeEnd 7 End
kOpCodePing 9 Ping
kOpCodePong 10 Pong
kOpCodeTextFrame 1 Text frame

Blog Entries


The items on this page are in the following plugins: MBS Network Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...