Lines Matching refs:fh
220 void operator()(struct FHRec_* fh) { in operator ()() argument
226 _fh_close(fh); in operator ()()
613 FH fh = _fh_from_int(fds[i].fd, __func__); in adb_poll() local
614 if (!fh || !fh->used || fh->clazz != &_fh_socket_class) { in adb_poll()
620 .fd = fh->u.socket, in adb_poll()
830 FH fh = _fh_from_int(fd, __func__); in adb_bind() local
832 if (!fh || fh->clazz != &_fh_socket_class) { in adb_bind()
838 if (bind(fh->fh_socket, addr, addrlen) == SOCKET_ERROR) { in adb_bind()
879 FH fh = _fh_from_int(fd, __func__); in adb_sendmsg() local
881 if (!fh || fh->clazz != &_fh_socket_class) { in adb_sendmsg()
894 auto ret = WSASendMsg(fh->fh_socket, &wmsg, 0, &num_bytes, NULL, NULL); in adb_sendmsg()
907 FH fh = _fh_from_int(fd, __func__); in GetWSARecvMsgFunc() local
909 if (!fh || fh->clazz != &_fh_socket_class) { in GetWSARecvMsgFunc()
919 if (WSAIoctl(fh->fh_socket, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid), &func, in GetWSARecvMsgFunc()
932 FH fh = _fh_from_int(fd, __func__); in adb_recvmsg() local
934 if (!fh || fh->clazz != &_fh_socket_class) { in adb_recvmsg()
956 const auto ret = WSARecvMsgFunc(fh->fh_socket, &wmsg, &num_bytes, NULL, NULL); in adb_recvmsg()
1202 FH fh = _fh_from_int(fd, __func__); in network_peek() local
1204 if (!fh || fh->clazz != &_fh_socket_class) { in network_peek()
1211 if (ioctlsocket(fh->fh_socket, FIONREAD, &sz_bytes) != 0) { in network_peek()
1237 unique_fh fh(_fh_alloc(&_fh_socket_class)); in adb_socket_accept() local
1238 if (!fh) { in adb_socket_accept()
1244 fh->fh_socket = accept(serverfh->fh_socket, addr, addrlen); in adb_socket_accept()
1245 if (fh->fh_socket == INVALID_SOCKET) { in adb_socket_accept()
1253 const int fd = _fh_to_int(fh.get()); in adb_socket_accept()
1254 snprintf(fh->name, sizeof(fh->name), "%d(accept:%s)", fd, serverfh->name); in adb_socket_accept()
1256 fh.release(); in adb_socket_accept()
1261 FH fh = _fh_from_int(fd, __func__); in adb_setsockopt() local
1263 if (!fh || fh->clazz != &_fh_socket_class) { in adb_setsockopt()
1274 setsockopt(fh->fh_socket, level, optname, reinterpret_cast<const char*>(optval), optlen); in adb_setsockopt()
1286 FH fh = _fh_from_int(fd, __func__); in adb_getsockname() local
1288 if (!fh || fh->clazz != &_fh_socket_class) { in adb_getsockname()
1294 int result = getsockname(fh->fh_socket, sockaddr, optlen); in adb_getsockname()
1394 FH fh = _fh_from_int(fd, __func__); in set_file_block_mode() local
1396 if (!fh || !fh->used) { in set_file_block_mode()
1402 if (fh->clazz == &_fh_socket_class) { in set_file_block_mode()
1404 if (ioctlsocket(fh->u.socket, FIONBIO, &x) != 0) { in set_file_block_mode()
1419 FH fh = _fh_from_int(fd, __func__); in set_tcp_keepalive() local
1421 if (!fh || fh->clazz != &_fh_socket_class) { in set_tcp_keepalive()
1433 if (WSAIoctl(fh->fh_socket, SIO_KEEPALIVE_VALS, &keepalive, sizeof(keepalive), nullptr, 0, in set_tcp_keepalive()