Lines Matching refs:bsd_socket
113 intern->bsd_socket = -1; /* invalid socket */ in socket_create_object()
133 close(socket->bsd_socket); in socket_free_obj()
244 sock->bsd_socket = socket(PF_INET, SOCK_STREAM, 0);
254 if (bind(sock->bsd_socket, (struct sockaddr *)&la, sizeof(la)) != 0) {
256 close(sock->bsd_socket);
260 if (listen(sock->bsd_socket, backlog) != 0) {
262 close(sock->bsd_socket);
272 out_sock->bsd_socket = accept(in_sock->bsd_socket, la, la_len);
297 m = fcntl(sock->bsd_socket, F_GETFL);
329 m = recv(sock->bsd_socket, (void *) t, 1, flags);
675 PHP_SAFE_FD_SET(php_sock->bsd_socket, fds);
676 if (php_sock->bsd_socket > *max_fd) {
677 *max_fd = php_sock->bsd_socket;
706 if (PHP_SAFE_FD_ISSET(php_sock->bsd_socket, fds)) {
881 if (php_set_sock_blocking(php_sock->bsd_socket, 0) == SUCCESS) {
919 if (php_set_sock_blocking(php_sock->bsd_socket, 1) == SUCCESS) {
943 if (listen(php_sock->bsd_socket, backlog) != 0) {
976 close(php_socket->bsd_socket);
981 php_socket->bsd_socket = -1;
1013 retval = write(php_sock->bsd_socket, str, MIN(length, str_len));
1015 retval = send(php_sock->bsd_socket, str, min(length, str_len), 0);
1053 retval = recv(php_sock->bsd_socket, ZSTR_VAL(tmpbuf), length, 0);
1108 if (getsockname(php_sock->bsd_socket, sa, &salen) != 0) {
1185 if (getpeername(php_sock->bsd_socket, sa, &salen) < 0) {
1266 php_sock->bsd_socket = socket(domain, type, protocol);
1318 retval = connect(php_sock->bsd_socket, (struct sockaddr *)&sin6, sizeof(struct sockaddr_in6));
1337 retval = connect(php_sock->bsd_socket, (struct sockaddr *)&sin, sizeof(struct sockaddr_in));
1351 retval = connect(php_sock->bsd_socket, (struct sockaddr *) &s_un,
1415 retval = bind(php_sock->bsd_socket, (struct sockaddr *) sa,
1431 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in));
1446 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in6));
1487 if ((retval = recv(php_sock->bsd_socket, ZSTR_VAL(recv_buf), len, flags)) < 1) {
1526 retval = send(php_sock->bsd_socket, buf, (buf_len < (size_t)len ? buf_len : (size_t)len), flags);
1577 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&s_un, …
1601 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin, (…
1632 …retval = recvfrom(php_sock->bsd_socket, ZSTR_VAL(recv_buf), arg3, arg4, (struct sockaddr *)&sin6, …
1693 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1710 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1727 …retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags,…
1771 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&if_addr, &optlen) != 0) {
1799 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&linger_val, &optlen) != 0) {
1814 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&tv, &optlen) != 0) {
1821 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&timeout, &optlen) != 0) {
1841 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&af, &optlen) != 0) {
1857 if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&other_val, &optlen) != 0) {
2016 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen);
2075 php_sock[0]->bsd_socket = fds_array[0];
2076 php_sock[1]->bsd_socket = fds_array[1];
2107 if (shutdown(php_sock->bsd_socket, how_shutdown) != 0) {
2173 retsock->bsd_socket = socket;
2280 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen);
2286 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen);
2302 getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &type, &typelen);
2323 stream = php_stream_sock_open_from_socket(socket->bsd_socket, 0);
2332 stream_data->socket = socket->bsd_socket;
2427 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2444 close(php_sock->bsd_socket);
2454 retval = bind(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2458 close(php_sock->bsd_socket);
2466 close(php_sock->bsd_socket);
2490 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2507 close(php_sock->bsd_socket);
2517 retval = connect(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2522 close(php_sock->bsd_socket);
2529 close(php_sock->bsd_socket);
2607 if (SOCKET_ERROR == WSADuplicateSocket(socket->bsd_socket, (DWORD)target_pid, &wi)) {
2696 php_sock->bsd_socket = sock;