websocket

command
v2.33.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT, MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package main simulates a conversation between a given set of websocket clients and a server.

It spins up a web socket server. On a client's connection it creates a SenderReceiver which handles JSON Stream encoding and decoding using gojay's streaming API to abstract JSON communication between server and client, only having to handle go values.

To simulate a conversation: - the server sends a welcome message to the client - when the client receives the message, it sends a message back to the server - when the server receives the ack message, it will send a message randomly to a client - when the client receives the message, it sends a message back to the server... and so on.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL