Skip to content

JayTwoLab/custom_websocket_client

Repository files navigation

custom_websocket_client

Korean

Introduction

custom_websocket_client is a C++ WebSocket client example based on the IXWebSocket library. This project demonstrates how to implement connections with a WebSocket server, send and receive messages, and ensure thread-safe transmissions with simple code.

Key Features

  • Connect and disconnect from WebSocket servers
  • Send and receive text/binary messages
  • Thread-safe message transmission
  • Connection status and error reporting

Build Instructions

  1. Install IXWebSocket Library
    • Install IXWebSocket using vcpkg, source build, or other methods.
  2. CMake Build
    mkdir build
    cd build
    cmake ..
    cmake --build .

Usage

Run the generated executable (ws_client) after building.

./ws_client

After starting the program, enter a message to send it to the server. Messages received from the server will be displayed in the console. Type exit to terminate the program.

Dependencies

  • IXWebSocket
  • C++17 or later
  • CMake 3.10 or later
  • (Linux) OpenSSL, pthread, etc.

License

MIT License (see LICENSE file)

About

C++ IXWebSocket WebSocket Client Example

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors