Lines Matching refs:bsd_socket
56 # define IS_INVALID_SOCKET(a) (a->bsd_socket < 0)
400 php_sock->bsd_socket = -1; /* invalid socket */ in php_create_socket()
416 close(php_sock->bsd_socket); in php_destroy_socket()
446 sock->bsd_socket = socket(PF_INET, SOCK_STREAM, 0);
457 if (bind(sock->bsd_socket, (struct sockaddr *)&la, sizeof(la)) != 0) {
459 close(sock->bsd_socket);
464 if (listen(sock->bsd_socket, backlog) != 0) {
466 close(sock->bsd_socket);
481 out_sock->bsd_socket = accept(in_sock->bsd_socket, la, la_len);
507 m = fcntl(sock->bsd_socket, F_GETFL);
539 m = recv(sock->bsd_socket, (void *) t, 1, flags);
797 PHP_SAFE_FD_SET(php_sock->bsd_socket, fds);
798 if (php_sock->bsd_socket > *max_fd) {
799 *max_fd = php_sock->bsd_socket;
825 if (PHP_SAFE_FD_ISSET(php_sock->bsd_socket, fds)) {
997 if (php_set_sock_blocking(php_sock->bsd_socket, 0) == SUCCESS) {
1037 if (php_set_sock_blocking(php_sock->bsd_socket, 1) == SUCCESS) {
1063 if (listen(php_sock->bsd_socket, backlog) != 0) {
1130 retval = write(php_sock->bsd_socket, str, MIN(length, str_len));
1132 retval = send(php_sock->bsd_socket, str, min(length, str_len), 0);
1172 retval = recv(php_sock->bsd_socket, ZSTR_VAL(tmpbuf), length, 0);
1231 if (getsockname(php_sock->bsd_socket, sa, &salen) != 0) {
1314 if (getpeername(php_sock->bsd_socket, sa, &salen) < 0) {
1394 php_sock->bsd_socket = socket(arg1, arg2, arg3);
1450 retval = connect(php_sock->bsd_socket, (struct sockaddr *)&sin6, sizeof(struct sockaddr_in6));
1469 retval = connect(php_sock->bsd_socket, (struct sockaddr *)&sin, sizeof(struct sockaddr_in));
1483 retval = connect(php_sock->bsd_socket, (struct sockaddr *) &s_un,
1552 retval = bind(php_sock->bsd_socket, (struct sockaddr *) sa,
1568 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in));
1583 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in6));
1626 if ((retval = recv(php_sock->bsd_socket, ZSTR_VAL(recv_buf), len, flags)) < 1) {
1672 retval = send(php_sock->bsd_socket, buf, (buf_len < (size_t)len ? buf_len : (size_t)len), flags);
1720 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&s_un, …
1747 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin, (…
1778 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin6, …
1845 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1861 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1877 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1923 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&if_addr, &optlen) != 0) {
1951 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&linger_val, &optlen) != 0) {
1966 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&tv, &optlen) != 0) {
1973 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&timeout, &optlen) != 0) {
1991 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&other_val, &optlen) != 0) {
2139 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen);
2191 php_sock[0]->bsd_socket = fds_array[0];
2192 php_sock[1]->bsd_socket = fds_array[1];
2228 if (shutdown(php_sock->bsd_socket, how_shutdown) != 0) {
2298 retsock->bsd_socket = socket;
2411 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen);
2417 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen);
2433 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &type, &typelen);
2454 stream = php_stream_sock_open_from_socket(socket->bsd_socket, 0);
2463 stream_data->socket = socket->bsd_socket;