MCPcopy Create free account
hub / github.com/Tom94/tev / SocketConnection

Method SocketConnection

src/Ipc.cpp:771–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771Ipc::SocketConnection::SocketConnection(Ipc::socket_t fd, string_view name) : mSocketFd{fd}, mName{name} {
772 TEV_ASSERT(mSocketFd != INVALID_SOCKET, "SocketConnection must receive a valid socket.");
773
774 makeSocketNonBlocking(mSocketFd);
775
776 // 1 MiB is a good default buffer size. If larger is required, it'll be automatizally resized.
777 mBuffer.resize(1024 * 1024);
778}
779
780Ipc::SocketConnection::~SocketConnection() { close(); }
781

Callers

nothing calls this directly

Calls 2

makeSocketNonBlockingFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected