MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / getAddressInfo

Function getAddressInfo

JUCE/modules/juce_core/network/juce_Socket.cpp:351–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349 }
350
351 static addrinfo* getAddressInfo (bool isDatagram, const String& hostName, int portNumber)
352 {
353 struct addrinfo hints;
354 zerostruct (hints);
355
356 hints.ai_family = AF_UNSPEC;
357 hints.ai_socktype = isDatagram ? SOCK_DGRAM : SOCK_STREAM;
358 hints.ai_flags = AI_NUMERICSERV;
359
360 struct addrinfo* info = nullptr;
361
362 if (getaddrinfo (hostName.toRawUTF8(), String (portNumber).toRawUTF8(), &hints, &info) == 0)
363 return info;
364
365 return nullptr;
366 }
367
368 static bool connectSocket (std::atomic<int>& handle,
369 CriticalSection& readLock,

Callers 2

connectSocketFunction · 0.85
writeMethod · 0.85

Calls 3

zerostructFunction · 0.85
toRawUTF8Method · 0.80
StringFunction · 0.50

Tested by

no test coverage detected