MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / hostResolveProc

Function hostResolveProc

modules/network/socket/win/modSocket.c:203–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203DWORD WINAPI hostResolveProc(LPVOID lpParameter)
204{
205 xsSocket xss = (xsSocket)lpParameter;
206 struct hostent *host;
207 struct sockaddr_in address = {0};
208
209 host = gethostbyname(xss->host);
210 if (NULL != host) {
211 address.sin_family = AF_INET;
212 c_memcpy(&(address.sin_addr), host->h_addr, host->h_length);
213 address.sin_port = htons(xss->port);
214 connect(xss->skt, (struct sockaddr*)&address, sizeof(address));
215 }
216
217 return 0;
218}
219
220int doReadSocket(xsMachine *the, xsSocket xss)
221{

Callers

nothing calls this directly

Calls 1

connectFunction · 0.50

Tested by

no test coverage detected