Examples


  • Server
    A simple WebSocket echo server using closures.
  • Client
    A simple WebSocket client for connecting to an echo server using closures.
  • Single-Threaded
    An example of an echo client and an echo server on one thread using closures.
  • Threads
    An example of an echo client and an echo server on separate threads. This demonstrates using a struct as a WebSocket handler.
  • Channels
    A more complex example using channels to communicate with a WebSocket handler to accomplish a separate task.
  • Pong
    An example demonstrating how to send and recieve a custom ping/pong frame.