From c2888a85bc4b80f0c6cd0a63fbbb300ae42a1001 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 28 Oct 2005 14:15:54 +0000 Subject: [PATCH] Belatedly document the NGM_KSOCKET_ACCEPT ("accept") control message. --- share/man/man4/ng_ksocket.4 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4 index 600a3888625..c61b1c2e3c6 100644 --- a/share/man/man4/ng_ksocket.4 +++ b/share/man/man4/ng_ksocket.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2004 +.Dd October 28, 2005 .Dt NG_KSOCKET 4 .Os .Sh NAME @@ -133,7 +133,21 @@ The .Vt "struct sockaddr" destination address parameter should be supplied as an argument. .It Dv NGM_KSOCKET_ACCEPT -Currently unimplemented. +Equivalent to the +.Xr accept 2 +system call on a non-blocking socket. +If there is a pending connection on the queue, +a new socket and a corresponding cloned node are created. +Returned are the cloned node's ID and a peer name (as +.Vt "struct sockaddr" ) . +If there are no pending connections, +this control message returns nothing, +and a connected node will receive the above message asynchronously, +when a connection is established. +.Pp +A cloned node supports a single hook with an arbitrary name. +If not connected, a node disappears when its parent node is destroyed. +Once connected, it becomes an independent node. .It Dv NGM_KSOCKET_GETNAME Equivalent to the .Xr getsockname 2