MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / connect

Method connect

Arduino/libraries/Ethernet2/src/EthernetClient.cpp:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23int EthernetClient::connect(const char* host, uint16_t port) {
24 // Look up the host first
25 int ret = 0;
26 DNSClient dns;
27 IPAddress remote_addr;
28
29 dns.begin(Ethernet.dnsServerIP());
30 ret = dns.getHostByName(host, remote_addr);
31 if (ret == 1) {
32 return connect(remote_addr, port);
33 } else {
34 return ret;
35 }
36}
37
38int EthernetClient::connect(IPAddress ip, uint16_t port) {
39 if (_sock != MAX_SOCK_NUM)

Callers 1

Twitter.cppFile · 0.45

Calls 5

dnsServerIPMethod · 0.80
getHostByNameMethod · 0.80
connectFunction · 0.50
socketFunction · 0.50
beginMethod · 0.45

Tested by

no test coverage detected