Lines Matching refs:parent

59 	BWeakReference<net_socket_private> parent;
119 if (parent != NULL)
120 panic("socket still has a parent!");
148 ASSERT(!is_in_socket_list && parent != NULL);
150 parent = NULL;
332 BReference<net_socket_private> parent = socket->parent.GetReference();
335 socket->first_protocol, socket->first_info, parent.Get(),
336 parent.IsSet() ? socket->is_connected ? " (c)" : " (p)" : "");
353 BReference<net_socket_private> parent = socket->parent.GetReference();
354 kprintf(" parent: %p\n", parent.Get());
387 kprintf("address kind owner protocol module_info parent\n");
612 net_socket_private* parent = (net_socket_private*)_parent;
614 TRACE("%s(%p)\n", __FUNCTION__, parent);
616 MutexLocker locker(parent->lock);
621 if (parent->child_count > 3 * parent->max_backlog / 2)
625 status_t status = create_socket(parent->family, parent->type,
626 parent->protocol, &socket);
630 // inherit parent's properties
631 socket->send = parent->send;
632 socket->receive = parent->receive;
633 socket->options = parent->options & (SO_KEEPALIVE | SO_DONTROUTE | SO_LINGER | SO_OOBINLINE);
634 socket->linger = parent->linger;
635 socket->owner = parent->owner;
636 memcpy(&socket->address, &parent->address, parent->address.ss_len);
637 memcpy(&socket->peer, &parent->peer, parent->peer.ss_len);
639 // add to the parent's list of pending connections
640 parent->pending_children.Add(socket);
641 socket->parent = parent;
642 parent->child_count++;
649 /*! Dequeues a connected child from a parent socket.
655 net_socket_private* parent = (net_socket_private*)_parent;
657 mutex_lock(&parent->lock);
659 net_socket_private* socket = parent->connected_children.RemoveHead();
663 parent->child_count--;
667 mutex_unlock(&parent->lock);
679 net_socket_private* parent = (net_socket_private*)_parent;
681 MutexLocker _(parent->lock);
682 return parent->connected_children.Count();
716 /*! Returns whether or not this socket has a parent. The parent might not be
723 return socket->parent != NULL;
728 of its parent socket.
737 if (socket->parent == NULL) {
742 BReference<net_socket_private> parent = socket->parent.GetReference();
743 if (!parent.IsSet())
746 MutexLocker _(parent->lock);
748 parent->pending_children.Remove(socket);
749 parent->connected_children.Add(socket);
752 // notify parent
753 if (parent->select_pool)
754 notify_select_event_pool(parent->select_pool, B_SELECT_READ);
760 /*! The socket has been aborted. Steals the parent's reference, and releases
770 BReference<net_socket_private> parent = socket->parent.GetReference();
771 if (!parent.IsSet())
774 MutexLocker _(parent->lock);
777 parent->connected_children.Remove(socket);
779 parent->pending_children.Remove(socket);
781 parent->child_count--;
970 BReference<net_socket_private> parent = socket->parent.GetReference();
972 if ((!parent.IsSet() && !socket->is_connected) || socket->peer.ss_len == 0)