Lines Matching refs:socket
67 #include <isc/socket.h>
112 * Some systems define the socket length argument as an int, some as size_t,
174 SOCK_ACCEPT, /* TCP socket is waiting to accept */
183 * IPv6 control information. If the socket is an IPv6 socket we want
234 /* Locked by socket lock. */
243 * Each recv() call uses this buffer. It is a per-socket receive
265 unsigned int listener : 1, /* listener socket */
494 * Create a private heap to handle the socket overlapped structure
535 * Associate a socket with an IO Completion Port. This allows us to queue events for it
577 * Routine to cleanup and then close the socket.
578 * Only close the socket here if it is NOT associated
581 * be running while closing an event or a socket.
582 * The socket is locked before calling this function
630 sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
656 * Initialize socket services
861 "socket %p line %d: %s", sock, lineno, msgbuf);
866 "socket %p line %d peer %s: %s", sock, lineno,
881 /* Set the socket to non-blocking */
900 * socket from using the WSARecvFrom in subsequent operations.
1339 * socket is UDP or TCP. If it is UDP, some errors
1515 * Verify that the socket state is consistent.
1561 * Maybe free the socket.
1563 * This function will verify tht the socket is no longer in use in any way,
1566 * the socket (e.g., some reference counter reaches zero), it should call
1569 * When calling this function, the socket must be locked, and the manager
1608 * Seems we can free the socket after all.
1613 "freeing socket line %d fd %d lock %p semaphore %p",
1634 * Create a new 'type' socket managed by 'manager'. Events
1636 * called with 'arg' as the arg value. The new socket is returned
1665 sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
1682 sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP);
1703 "socket() %s: %s",
1790 * Note we don't have to lock the socket like we normally would because
1813 * Attach to a socket. Caller must explicitly detach when it is done.
1829 * Dereference a socket. If this is the last reference to it, clean things
1830 * up by destroying the socket.
1871 * Dequeue an item off the given socket's read queue, set the result code
1878 * Caller must have the socket locked if the event is attached to the socket.
1968 * Note the socket is locked before entering here
2011 * Extract the addresses from the socket, copy them into the structure,
2012 * and return the new socket.
2067 * Called when a socket with a pending connect() finishes.
2068 * Note that the socket is locked before entering.
2156 * Loop through the socket, returning ISC_R_EOF for each done event pending.
2223 * Unlock and/or destroy if we are the last thing this socket has left to do.
2235 * Find out what socket this is and lock it.
2244 "internal_send: task got socket event %p", dev);
2334 // This code should only be called when the listening socket has received
2335 // such an error. Additionally, the "parent" socket must be locked.
2346 * AcceptEx() requires we pass in a socket. Note that we carefully
2347 * do not close the previous socket in case of an error message returned by
2348 * our new socket() call. If we return an error here, our caller will
2351 new_fd = socket(parent->pf, SOCK_STREAM, IPPROTO_TCP);
2560 * Create a new socket manager.
2642 * Destroy a socket manager.
2726 * Caller must have the socket locked.
2776 * Make sure that the socket is not closed. XXXMLG change error here?
2843 * make sure that the socket's not closed
2881 * make sure that the socket's not closed
2912 * Caller must have the socket locked.
3004 * make sure that the socket's not closed
3066 * make sure that the socket's not closed
3122 * make sure that the socket's not closed
3151 * make sure that the socket's not closed
3215 * Set up to listen on a given socket. We do this by creating an internal
3216 * event that will be dispatched when the socket has read activity. The
3234 * make sure that the socket's not closed
3289 * make sure that the socket's not closed
3301 * actual ev_sender will be touched up to be the socket.
3320 * AcceptEx() requires we pass in a socket.
3322 nsock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
3331 * Attach to socket and to task.
3414 * make sure that the socket's not closed
3422 * Windows sockets won't connect unless the socket is bound.
3513 * make sure that the socket's not closed
3545 * make sure that the socket's not closed
3576 * Run through the list of events on this socket, and cancel the ones
3595 * make sure that the socket's not closed
3714 * make sure that the socket's not closed
3736 * make sure that the socket's not closed
3785 isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
3788 * Name 'socket'.
3791 REQUIRE(VALID_SOCKET(socket));
3793 LOCK(&socket->lock);
3794 memset(socket->name, 0, sizeof(socket->name));
3795 strncpy(socket->name, name, sizeof(socket->name) - 1);
3796 socket->tag = tag;
3797 UNLOCK(&socket->lock);
3801 isc_socket_getname(isc_socket_t *socket) {
3802 return (socket->name);
3806 isc_socket_gettag(isc_socket_t *socket) {
3807 return (socket->tag);