Lines Matching refs:bsd_socket
114 intern->bsd_socket = -1; /* invalid socket */ in socket_create_object()
134 close(socket->bsd_socket); in socket_free_obj()
243 sock->bsd_socket = socket(PF_INET, SOCK_STREAM, 0);
253 if (bind(sock->bsd_socket, (struct sockaddr *)&la, sizeof(la)) != 0) {
255 close(sock->bsd_socket);
259 if (listen(sock->bsd_socket, backlog) != 0) {
261 close(sock->bsd_socket);
271 out_sock->bsd_socket = accept(in_sock->bsd_socket, la, la_len);
296 m = fcntl(sock->bsd_socket, F_GETFL);
328 m = recv(sock->bsd_socket, (void *) t, 1, flags);
669 PHP_SAFE_FD_SET(php_sock->bsd_socket, fds);
670 if (php_sock->bsd_socket > *max_fd) {
671 *max_fd = php_sock->bsd_socket;
700 if (PHP_SAFE_FD_ISSET(php_sock->bsd_socket, fds)) {
875 if (php_set_sock_blocking(php_sock->bsd_socket, 0) == SUCCESS) {
913 if (php_set_sock_blocking(php_sock->bsd_socket, 1) == SUCCESS) {
937 if (listen(php_sock->bsd_socket, backlog) != 0) {
970 close(php_socket->bsd_socket);
975 php_socket->bsd_socket = -1;
1007 retval = write(php_sock->bsd_socket, str, MIN(length, str_len));
1009 retval = send(php_sock->bsd_socket, str, min(length, str_len), 0);
1047 retval = recv(php_sock->bsd_socket, ZSTR_VAL(tmpbuf), length, 0);
1104 if (getsockname(php_sock->bsd_socket, sa, &salen) != 0) {
1176 if (getpeername(php_sock->bsd_socket, sa, &salen) < 0) {
1254 php_sock->bsd_socket = socket(domain, type, protocol);
1306 retval = connect(php_sock->bsd_socket, (struct sockaddr *)&sin6, sizeof(struct sockaddr_in6));
1325 retval = connect(php_sock->bsd_socket, (struct sockaddr *)&sin, sizeof(struct sockaddr_in));
1339 retval = connect(php_sock->bsd_socket, (struct sockaddr *) &s_un,
1403 retval = bind(php_sock->bsd_socket, (struct sockaddr *) sa,
1419 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in));
1434 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in6));
1475 if ((retval = recv(php_sock->bsd_socket, ZSTR_VAL(recv_buf), len, flags)) < 1) {
1514 retval = send(php_sock->bsd_socket, buf, (buf_len < (size_t)len ? buf_len : (size_t)len), flags);
1563 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&s_un, …
1587 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin, (…
1614 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin6, …
1675 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1692 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1709 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1753 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&if_addr, &optlen) != 0) {
1781 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&linger_val, &optlen) != 0) {
1796 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&tv, &optlen) != 0) {
1803 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&timeout, &optlen) != 0) {
1822 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&other_val, &optlen) != 0) {
1967 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen);
2026 php_sock[0]->bsd_socket = fds_array[0];
2027 php_sock[1]->bsd_socket = fds_array[1];
2058 if (shutdown(php_sock->bsd_socket, how_shutdown) != 0) {
2124 retsock->bsd_socket = socket;
2231 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen);
2237 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen);
2253 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &type, &typelen);
2274 stream = php_stream_sock_open_from_socket(socket->bsd_socket, 0);
2283 stream_data->socket = socket->bsd_socket;
2378 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2395 close(php_sock->bsd_socket);
2405 retval = bind(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2409 close(php_sock->bsd_socket);
2417 close(php_sock->bsd_socket);
2441 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2458 close(php_sock->bsd_socket);
2468 retval = connect(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2473 close(php_sock->bsd_socket);
2480 close(php_sock->bsd_socket);
2558 if (SOCKET_ERROR == WSADuplicateSocket(socket->bsd_socket, (DWORD)target_pid, &wi)) {
2647 php_sock->bsd_socket = sock;