Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

WebSocketLink

Symbols

  • WebSocketConnect
  • WebSocketObject
  • WebSocketServerStart
ToneAr`WebSocketLink`
WebSocketServerStart
​
WebSocketServerStart[]
starts a new WebSocket server on any available port.
​
​
WebSocketServerStart[port]
starts a new WebSocket server listening on
port
.
​
Details and Options
​
Examples  
(1)
Basic Examples  
(1)
Start a secure WebSocket server with an automatically generated localhost certificate:
In[1]:=
server=
WebSocketServerStart
[30000,"TLS"True]
Connect from a Wolfram client in the same kernel using WSS:
In[2]:=
client=
WebSocketConnect
["wss://localhost:30000"]
For browser testing, create or provide a certificate trusted by the browser. One common local-development workflow is mkcert:
mkcert -install
mkcert -pkcs12 localhost 127.0.0.1 ::1
Start the server with a trusted PKCS#12 certificate. Use the password for the generated certificate file; mkcert PKCS#12 files usually use "changeit".
In[3]:=
server=
WebSocketServerStart
[30000,"TLS"True,"Certificate"{"localhost+2.p12","changeit"}]
A browser client can then connect with JavaScript if the certificate is trusted by the browser:
const ws = new WebSocket("wss://localhost:30000");
ws.onopen = () => ws.send("hello from browser");
Close the client and server when finished:
In[4]:=
Close/@{client,server}
SeeAlso
WebSocketConnect
▪
WebSocketObject
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com