MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / Bind

Method Bind

src/network/socket_wrapper.hpp:240–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 }
239
240 inline bool Bind(int port) {
241 sockaddr_in local_addr = GetAddress("0.0.0.0", port);
242 if (bind(sockfd_, reinterpret_cast<const sockaddr*>(&local_addr), sizeof(sockaddr_in)) == 0) {
243 return true;
244 }
245 return false;
246 }
247
248 inline bool Connect(const char *url, int port) {
249 sockaddr_in server_addr = GetAddress(url, port);

Callers 1

TryBindMethod · 0.45

Calls 1

bindFunction · 0.85

Tested by

no test coverage detected