/vbox/src/libs/xpcom18a4/nsprpub/pr/tests/ |
H A D | sockpong.c | 63 PRFileDesc *sock; local 69 sock = PR_GetInheritedFD("SOCKET"); 70 if (sock == NULL) { 74 status = PR_SetFDInheritable(sock, PR_FALSE); 82 nBytes = PR_Read(sock, buf, sizeof(buf)); 102 nBytes = PR_Write(sock, buf, 5); 109 status = PR_Close(sock);
|
H A D | prpollml.c | 93 PRFileDesc *sock; local 101 sock = PR_NewTCPSocket(); 102 if (sock == NULL) { 106 if (PR_Bind(sock, &addr) == PR_FAILURE) { 110 if (PR_Listen(sock, 5) == PR_FAILURE) { 115 pd[i].fd = sock;
|
H A D | sockping.c | 66 PRFileDesc *sock[2]; local 75 status = PR_NewTCPSocketPair(sock); 81 status = PR_SetFDInheritable(sock[0], PR_FALSE); 87 status = PR_SetFDInheritable(sock[1], PR_TRUE); 100 status = PR_ProcessAttrSetInheritableFD(attr, sock[1], "SOCKET"); 112 status = PR_Close(sock[1]); 121 nBytes = PR_Write(sock[0], buf, 5); 128 nBytes = PR_Read(sock[0], buf, sizeof(buf)); 147 status = PR_Close(sock[0]);
|
H A D | zerolen.c | 78 PRFileDesc *sock; local 84 sock = PR_NewTCPSocket(); 85 if (NULL == sock) { 93 if (PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT) == PR_FAILURE) { 107 while ((nbytes = PR_Read(sock, buf, sizeof(buf))) > 0) { 114 if (PR_Close(sock) == PR_FAILURE) {
|
H A D | forktest.c | 81 PRFileDesc *sock = NULL; local 95 if ((sock = PR_NewTCPSocket()) == NULL) { 101 if (PR_Bind(sock, &addr) != PR_SUCCESS) { 111 if (PR_Connect(sock, &addr, PR_SecondsToInterval(5)) != 120 if (PR_Send(sock, message, strlen(message) + 1, 0, PR_INTERVAL_NO_TIMEOUT) == 128 if (sock) { 129 PR_Close(sock); 144 PRFileDesc *sock = NULL; local 188 sock = PR_Accept(listenSock, &addr, PR_SecondsToInterval(5)); 189 if (!sock) { [all...] |
H A D | intrio.c | 70 PRFileDesc *sock, *newsock; local 73 sock = PR_OpenTCPSocket(PR_AF_INET6); 74 if (sock == NULL) { 83 if (PR_Bind(sock, &addr) == PR_FAILURE) { 87 if (PR_Listen(sock, 5) == PR_FAILURE) { 96 newsock = PR_Accept(sock, NULL, PR_INTERVAL_NO_TIMEOUT); 107 if (PR_Close(sock) == PR_FAILURE) {
|
H A D | peek.c | 73 PRFileDesc *sock; local 79 sock = PR_Accept(listenSock, NULL, PR_INTERVAL_NO_TIMEOUT); 80 if (NULL == sock) { 87 nbytes = PR_Recv(sock, buf, recv_amount[i], 107 nbytes = PR_Recv(sock, buf, recv_amount[i], 127 nbytes = PR_Recv(sock, buf, recv_amount[i], 148 nbytes = PR_Send(sock, buf, send_amount[i], 159 if (PR_Close(sock) == PR_FAILURE) { 168 PRFileDesc *sock; local 179 sock [all...] |
H A D | sendzlf.c | 59 PRFileDesc *sock; local 68 sock = PR_NewTCPSocket(); 69 if (NULL == sock) { 77 if (PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT) == PR_FAILURE) { 83 while ((nbytes = PR_Read(sock, bufPtr, sizeof(buf)-ntotal)) > 0) { 102 if (PR_Close(sock) == PR_FAILURE) {
|
H A D | acceptread.c | 69 PRFileDesc *sock; local 74 sock = PR_NewTCPSocket(); 75 if (sock == NULL) 81 if (PR_Connect(sock, addr, PR_INTERVAL_NO_TIMEOUT) == PR_FAILURE) 86 if (PR_GetPeerName(sock, &peer_addr) == PR_FAILURE) 100 nbytes = PR_Send(sock, GET, sizeof(GET), 0, PR_INTERVAL_NO_TIMEOUT); 103 nbytes = PR_Recv(sock, buf, sizeof(buf), 0, PR_INTERVAL_NO_TIMEOUT); 112 if (PR_FAILURE == PR_Shutdown(sock, PR_SHUTDOWN_BOTH)) 115 if (PR_FAILURE == PR_Close(sock))
|
H A D | nonblock.c | 87 PRFileDesc *sock; local 106 sock = PR_NewTCPSocket(); 109 PR_SetSocketOption(sock, &optval); 110 retVal = PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT); 116 pd.fd = sock; 126 PR_FD_SET(sock, &writeSet); 129 PR_ASSERT(PR_FD_ISSET(sock, &writeSet)); 138 nBytes = PR_Write(sock, buf, sizeof(buf)); 151 PR_Close(sock); 156 PRFileDesc *listenSock, *sock; local [all...] |
H A D | poll_nm.c | 100 PRFileDesc *sock; local 114 sock = PR_NewTCPSocket(); 115 PR_ASSERT(sock != NULL); 117 sts = PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT); 120 n = PR_Write(sock, buf, sizeof(buf)); 123 sts = PR_Close(sock); 302 PRFileDesc *sock; local 305 sock = PR_Accept(pds[j].fd, NULL, PR_INTERVAL_NO_TIMEOUT); 306 if (sock == NULL) { 311 other_pds[nextIndex].fd = sock; [all...] |
H A D | prpoll.c | 69 PRFileDesc *sock; local 80 sock = PR_NewTCPSocket(); 81 PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT); 83 PR_Write(sock, buf, sizeof(buf)); 84 PR_Close(sock); 281 PRFileDesc *sock; local 295 sock = PR_Accept(pds[j].fd, NULL, PR_INTERVAL_NO_TIMEOUT); 296 if (sock == NULL) { 300 other_pds[nextIndex].fd = sock;
|
H A D | prselect.c | 101 PRFileDesc *sock; local 112 sock = PR_NewTCPSocket(); 113 PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT); 114 PR_Write(sock, buf, sizeof(buf)); 115 PR_Close(sock); 323 PRFileDesc *sock; local 326 sock = PR_Accept(fds[j], NULL, PR_INTERVAL_NO_TIMEOUT); 327 if (sock == NULL) { 331 other_fds[nextIndex] = sock; 332 PR_FD_SET(sock, [all...] |
H A D | selct_nm.c | 85 PRFileDesc *sock; local 96 sock = PR_NewTCPSocket(); 97 PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT); 98 PR_Write(sock, buf, sizeof(buf)); 99 PR_Close(sock); 263 PRFileDesc *sock; local 266 sock = PR_Accept(fds[j], NULL, PR_INTERVAL_NO_TIMEOUT); 267 if (sock == NULL) { 272 other_fds[nextIndex] = sock; 273 PR_FD_SET(sock, [all...] |
H A D | acceptreademu.c | 84 PRFileDesc *sock; local 89 sock = PR_NewTCPSocket(); 90 if (sock == NULL) 96 if (PR_Connect(sock, addr, PR_INTERVAL_NO_TIMEOUT) == PR_FAILURE) 101 if (PR_GetPeerName(sock, &peer_addr) == PR_FAILURE) 115 nbytes = PR_Send(sock, GET, sizeof(GET), 0, PR_INTERVAL_NO_TIMEOUT); 118 nbytes = PR_Recv(sock, buf, sizeof(buf), 0, PR_INTERVAL_NO_TIMEOUT); 127 if (PR_FAILURE == PR_Shutdown(sock, PR_SHUTDOWN_BOTH)) 130 if (PR_FAILURE == PR_Close(sock))
|
/vbox/src/VBox/NetworkServices/NAT/ |
H A D | fwtcp.c | 61 SOCKET sock; member in struct:fwtcp 144 closesocket(fwtcp->sock); 145 fwtcp->sock = INVALID_SOCKET; 175 fwtcp->sock = lsock; 198 status = pollmgr_add(&fwtcp->pmhdl, fwtcp->sock, POLLIN); 228 LWIP_ASSERT1(fd == fwtcp->sock); 236 newsock = accept(fwtcp->sock, (struct sockaddr *)&ss, &sslen);
|
H A D | fwudp.c | 90 SOCKET sock; member in struct:fwudp 184 SOCKET sock; local 187 sock = proxy_bound_socket(fwspec->sdom, fwspec->stype, &fwspec->src.sa); 188 if (sock == INVALID_SOCKET) { 194 closesocket(sock); 202 fwudp->sock = sock; 222 closesocket(sock); 242 status = pollmgr_add(&fwudp->pmhdl, fwudp->sock, POLLIN); 244 closesocket(sock); [all...] |
H A D | proxy.c | 583 proxy_sendto(SOCKET sock, struct pbuf *p, void *name, size_t namelen) argument 636 nsent = sendmsg(sock, &mh, 0); 639 rc = WSASendTo(sock, iov, (DWORD)clen, &nsent, 0, 645 __func__, sock, error));
|
H A D | pxudp.c | 66 SOCKET sock; member in struct:pxudp 253 status = pollmgr_add(&pxudp->pmhdl, pxudp->sock, POLLIN); 275 DPRINTF(("pxudp_del: pxudp %p; socket %d\n", (void *)pxudp, pxudp->sock)); 305 pxudp->sock = INVALID_SOCKET; 413 if (pxudp->sock != INVALID_SOCKET) { 414 closesocket(pxudp->sock); 415 pxudp->sock = INVALID_SOCKET; 500 SOCKET sock; local 537 sock = proxy_connected_socket(sdom, SOCK_DGRAM, 539 if (sock [all...] |
/vbox/src/VBox/Main/src-server/darwin/ |
H A D | NetIf-darwin.cpp | 59 int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); 60 if (sock < 0) 69 close(sock); 89 if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0) 149 close(sock); 310 int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); local 311 if (sock < 0) 395 if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0) 428 close(sock); 461 int sock local [all...] |
/vbox/src/VBox/Main/src-server/freebsd/ |
H A D | NetIf-freebsd.cpp | 215 int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); local 216 if (sock < 0) 276 if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0) 305 close(sock); 340 int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); local 341 if (sock < 0) 395 if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0) 406 close(sock);
|
/vbox/src/VBox/Main/src-server/generic/ |
H A D | NetIf-generic.cpp | 382 int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); local 383 if (sock < 0) 388 if (ioctl(sock, SIOCGIFFLAGS, &Req) < 0) 395 close(sock);
|
/vbox/src/VBox/Main/src-server/linux/ |
H A D | NetIf-linux.cpp | 222 int sock = socket(AF_INET, SOCK_DGRAM, 0); local 223 if (sock >= 0) 239 rc = getInterfaceInfo(sock, pszName, &Info); 265 close(sock); 276 int sock = socket(AF_INET, SOCK_DGRAM, 0); local 277 if (sock < 0) 279 rc = getInterfaceInfo(sock, pInfo->szShortName, pInfo); 280 close(sock); 295 int sock = socket(AF_INET, SOCK_DGRAM, 0); local 296 if (sock < [all...] |
/vbox/src/VBox/GuestHost/OpenGL/util/ |
H A D | udptcpip.c | 447 CRSocket sock = conn->tcp_socket; local 452 if ( (int) sock + 1 > max_fd ) 453 max_fd = (int) sock + 1; 454 FD_SET( sock, &read_fds ); 456 sock = conn->udp_socket; 457 if ( (int) sock + 1 > max_fd ) 458 max_fd = (int) sock + 1; 459 FD_SET( sock, &read_fds ); 492 int sock; local 557 sock [all...] |
/vbox/src/libs/xpcom18a4/nsprpub/pr/src/md/windows/ |
H A D | w95sock.c | 60 SOCKET sock; local 63 sock = socket(af, type, flags); 65 if (sock == INVALID_SOCKET ) 68 return (PRInt32)sock; 74 if (ioctlsocket( sock, FIONBIO, &one) != 0) 77 closesocket(sock); 81 return (PRInt32)sock;
|