MCPcopy Create free account
hub / github.com/30hours/blah2 / Socket

Method Socket

src/process/utility/Socket.cpp:7–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5const uint32_t Socket::MTU = 1024;
6
7Socket::Socket(const std::string& ip, uint16_t port)
8 : endpoint(asio::ip::address::from_string(ip), port), socket(io_context) {
9 try {
10 socket.connect(endpoint);
11 } catch (const std::exception& e) {
12 std::cerr << "Error connecting to endpoint: " << e.what() << std::endl;
13 throw;
14 }
15}
16
17Socket::~Socket()
18{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected