feat: add cJSON and SQLite amalgamation source files under deps/
Add the cJSON library (cJSON.c, cJSON.h) and SQLite amalgamation (sqlite3.c, sqlite3.h, sqlite3ext.h, shell.c) as vendored dependencies in the deps/ directory for use by the project build system.
This commit is contained in:
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "websocket" for WebSocket
|
||||
|
||||
System.print("=== WebSocket Client Demo ===\n")
|
||||
|
||||
System.print("Connecting to ws://127.0.0.1:8080...")
|
||||
var ws = WebSocket.connect("ws://127.0.0.1:8080")
|
||||
System.print("Connected\n")
|
||||
|
||||
System.print("--- Sending Text Message ---")
|
||||
ws.send("Hello WebSocket!")
|
||||
var msg = ws.receive()
|
||||
System.print("Received: %(msg.text)")
|
||||
|
||||
System.print("\n--- Sending Binary Message ---")
|
||||
ws.sendBinary([72, 101, 108, 108, 111])
|
||||
msg = ws.receive()
|
||||
System.print("Received bytes: %(msg.bytes)")
|
||||
|
||||
System.print("\n--- Closing Connection ---")
|
||||
ws.close(1000, "Client closing")
|
||||
System.print("Connection closed")
|
||||
Reference in New Issue
Block a user