diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-05-20 11:55:50 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-05-20 11:55:50 +0200 |
commit | 5876e74fa32881b41478cd67c5b0895161fbdc9c (patch) | |
tree | aa5ea781dde2ae1c06f40cbd81c988f7643ef491 /client/main.cpp | |
parent | b854c4d6ac06c4a39006a086766deb90096c2998 (diff) |
add socket class + test async prompt messages
Diffstat (limited to 'client/main.cpp')
-rw-r--r-- | client/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/main.cpp b/client/main.cpp index 3d3a68c..6aad0e3 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -3,6 +3,7 @@ #include <cstdint> #include "rl.h" +#include "sock.h" int main(int argc, char** argv) { if (argc < 2) { @@ -11,10 +12,13 @@ int main(int argc, char** argv) { } // parse arguments - char* addr_str = argv[1]; + char* addr = argv[1]; uint16_t port = 9191; if (argc >= 3) port = atoi(argv[2]); + // connect to TCP socket (automatically spawns thread) + PBSocket sock(addr, port); + // enter main CLI (using GNU readline for comfyness) return cli_main(); } |