Split connect_code file into header and implementation

This commit is contained in:
2024-02-19 21:39:37 -05:00
parent e9c0fe563c
commit 41f44797a1
2 changed files with 97 additions and 0 deletions

14
includes/connect_code.hpp Normal file
View File

@@ -0,0 +1,14 @@
#ifndef _CONNECT_CODE
#define _CONNECT_CODE
#include <string>
#include <vector>
namespace connect_code {
/* Given an address and a port, return a 'code' which has the address and port encoded in it */
std::string encode(std::string address, std::string port);
/* Given a code, decode it and return a vector with the address and port */
std::vector<std::string> decode(std::string connect_code);
}
#endif