sendreceive/

directory
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0

README

WebSocket Client-Server Example

This example demonstrates a simple client-server interaction using WebSocket communication. The setup includes a client folder and a server folder, each containing a respective binary. The server binary starts a WebSocket server and sends a message, while the client binary starts a WebSocket client and waits to receive a message.

Usage

  1. Open a terminal or command prompt.
  2. Navigate to the client folder.
  3. Built and run the client
    go build && ./client

One can run multiple instances of the client binary.

  1. Open another terminal or command prompt.
  2. Navigate to the server folder.
  3. Build and run the server
    go build && ./server
  1. Wait for the server to successfully send the messages and the clients to receive them.
  2. Close the clients and the server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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