Lines Matching defs:hNative

142     RTSOCKETNATIVE      hNative;
357 if (ioctlsocket(pThis->hNative, FIONBIO, &uBlocking))
361 int fFlags = fcntl(pThis->hNative, F_GETFL, 0);
369 if (fcntl(pThis->hNative, F_SETFL, fFlags) == -1)
400 * @param hNative The native handle.
402 int rtSocketCreateForNative(RTSOCKETINT **ppSocket, RTSOCKETNATIVE hNative)
409 pThis->hNative = hNative;
451 RTSOCKETNATIVE hNative = socket(iDomain, iType, iProtocol);
452 if (hNative == NIL_RTSOCKETNATIVE)
458 int rc = rtSocketCreateForNative(phSocket, hNative);
462 closesocket(hNative);
464 close(hNative);
504 RTSOCKETNATIVE hNative = pThis->hNative;
505 if (hNative != NIL_RTSOCKETNATIVE)
507 pThis->hNative = NIL_RTSOCKETNATIVE;
510 if (closesocket(hNative))
512 if (close(hNative))
517 AssertMsgFailed(("\"%s\": closesocket(%p) -> %Rrc\n", (uintptr_t)hNative, rc));
519 AssertMsgFailed(("\"%s\": close(%d) -> %Rrc\n", hNative, rc));
582 return (RTHCUINTPTR)pThis->hNative;
595 if (!SetHandleInformation((HANDLE)pThis->hNative, HANDLE_FLAG_INHERIT, fInheritable ? HANDLE_FLAG_INHERIT : 0))
598 if (fcntl(pThis->hNative, F_SETFD, fInheritable ? 0 : FD_CLOEXEC) < 0)
857 ssize_t cbBytesRead = recv(pThis->hNative, (char *)pvBuffer + cbRead, cbNow, MSG_NOSIGNAL);
926 ssize_t cbBytesRead = recvfrom(pThis->hNative, (char *)pvBuffer + cbRead, cbNow, MSG_NOSIGNAL, &u.Addr, &cbAddr);
971 ssize_t cbWritten = send(pThis->hNative, (const char *)pvBuffer, cbNow, MSG_NOSIGNAL);
998 cbWritten = send(pThis->hNative, (const char *)pvBuffer, cbNow, MSG_NOSIGNAL);
1059 ssize_t cbWritten = sendto(pThis->hNative, (const char *)pvBuffer, cbNow, MSG_NOSIGNAL, pSA, cbSA);
1106 int hrc = WSASend(pThis->hNative, paMsg, pSgBuf->cSegs, &dwSent,
1135 ssize_t cbWritten = sendmsg(pThis->hNative, &msgHdr, MSG_NOSIGNAL);
1207 int cbRead = recv(pThis->hNative, (char *)pvBuffer, cbNow, MSG_NOSIGNAL);
1219 ssize_t cbRead = recv(pThis->hNative, pvBuffer, cbNow, MSG_NOSIGNAL);
1259 int cbWritten = send(pThis->hNative, (const char *)pvBuffer, cbNow, MSG_NOSIGNAL);
1271 ssize_t cbWritten = send(pThis->hNative, pvBuffer, cbBuffer, MSG_NOSIGNAL);
1314 int hrc = WSASend(pThis->hNative, paMsg, cSegsToSend, &dwSent,
1336 ssize_t cbWritten = sendmsg(pThis->hNative, &msgHdr, MSG_NOSIGNAL);
1394 int const fdMax = (int)pThis->hNative + 1;
1395 AssertReturn(fdMax - 1 == pThis->hNative, VERR_INTERNAL_ERROR_5);
1402 FD_SET(pThis->hNative, &fdsetR);
1439 int const fdMax = (int)pThis->hNative + 1;
1440 AssertReturn(fdMax - 1 == pThis->hNative, VERR_INTERNAL_ERROR_5);
1455 FD_SET(pThis->hNative, &fdsetR);
1457 FD_SET(pThis->hNative, &fdsetW);
1459 FD_SET(pThis->hNative, &fdsetE);
1473 if (FD_ISSET(pThis->hNative, &fdsetR))
1475 if (FD_ISSET(pThis->hNative, &fdsetW))
1477 if (FD_ISSET(pThis->hNative, &fdsetE))
1514 if (shutdown(pThis->hNative, fHow) == -1)
1542 if (getsockname(pThis->hNative, &u.Addr, &cbAddr) == 0)
1572 if (getpeername(pThis->hNative, &u.Addr, &cbAddr) == 0)
1621 if (bind(pThis->hNative, (struct sockaddr const *)pvAddr, (int)cbAddr) == 0)
1650 if (listen(pThis->hNative, cMaxPending) != 0)
1692 RTSOCKETNATIVE hNativeClient = accept(pThis->hNative, pAddr, &cbAddr);
1746 if (connect(pThis->hNative, &u.Addr, cbAddr) != 0)
1759 if (connect(pThis->hNative, &u.Addr, cbAddr) != 0)
1772 FD_SET(pThis->hNative, &FdSetWriteable);
1775 rcSock = select(pThis->hNative + 1, NULL, &FdSetWriteable, NULL,
1783 rcSock = getsockopt(pThis->hNative, SOL_SOCKET, SO_ERROR, (char *)&iSockError, &cbSockOpt);
1839 if (setsockopt(pThis->hNative, iLevel, iOption, (const char *)pvValue, cbValue) != 0)
1879 *phNative = (RTHCUINTPTR)pThis->hNative;
1897 if (WSAEventSelect(pThis->hNative, WSA_INVALID_EVENT, 0) == 0)
1908 int rc2 = ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking);
1943 if (WSAEventSelect(pThis->hNative, pThis->hEvent, fNetworkEvents) == 0)
1981 if (WSAEnumNetworkEvents(pThis->hNative, pThis->hEvent, &NetEvts) == 0)
2014 int aFds[4] = { pThis->hNative, pThis->hNative, pThis->hNative, -1 };
2018 if (aFds[0] == pThis->hNative)
2020 if (aFds[1] == pThis->hNative)
2022 if (aFds[2] == pThis->hNative)