Chapter 1: Initial Setup & Basics
Setting up the basic types, opening and closing connections, sending and receiving messages.
Step 1A basic program loop that prompts the user for a command and then processes it. In this tutorial we will modify this program to perform tasks and retrieve data from a remote server over a WebSocket connection.
Buildclang++ step1.cpp
note A code snapshot for each step is present next to this tutorial file in the git repository.
#include
#include
int main() {
bool done = false;
std::string input;
while (!done) {
std::cout
Remote Server: WebSocket++/0.4.0> Error/close reason: N/A
> Messages Processed: (2)
>> example message
关注
打赏