OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / draft / man2 / listen.2
diff --git a/draft/man2/listen.2 b/draft/man2/listen.2
deleted file mode 100644 (file)
index 7bfb891..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-.\" Copyright (c) 1983, 1991 The Regents of the University of California.
-.\" and Copyright (C) 2007, Michael Kerrisk <mtk.manpages@gmail.com>
-.\" All rights reserved.
-.\"
-.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\" %%%LICENSE_END
-.\"
-.\"     $Id: listen.2,v 1.6 1999/05/18 14:10:32 freitag Exp $
-.\"
-.\" Modified Fri Jul 23 22:07:54 1993 by Rik Faith <faith@cs.unc.edu>
-.\" Modified 950727 by aeb, following a suggestion by Urs Thuermann
-.\" <urs@isnogud.escape.de>
-.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
-.\" Modified 1998 by Andi Kleen
-.\" Modified 11 May 2001 by Sam Varshavchik <mrsam@courier-mta.com>
-.\"
-.\"
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 1998 Shinya HANATAKA, Takeshi Hakamada
-.\"         all rights reserved.
-.\" Translated 1998-04-06,Shinya HANATAKA <shinya@abyss.rim.or.jp>
-.\"                   and Takeshi Hakamada <hakamada@nsg.sgi.com>
-.\" Modified 2000-01-13, Kentaro Shirakata <argrath@yo.rim.or.jp>
-.\" Modified 2001-05-19, Shinya HANATAKA <shinya@abyss.rim.or.jp>
-.\" Updated 2007-07-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.58
-.\" Updated 2008-02-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
-.\"
-.TH LISTEN 2 2014\-05\-10 Linux "Linux Programmer's Manual"
-.SH 名前
-listen \- ソケット(socket)上の接続を待つ
-.SH 書式
-.nf
-\fB#include <sys/types.h>\fP          /* 「注意」参照 */
-.br
-\fB#include <sys/socket.h>\fP
-.sp
-\fBint listen(int \fP\fIsockfd\fP\fB, int \fP\fIbacklog\fP\fB);\fP
-.fi
-.SH 説明
-\fBlisten\fP()  は \fIsockfd\fP が参照するソケットを接続待ちソケット (passive socket) として印をつける。
-接続待ちソケットとは、 \fBaccept\fP(2)  を使って到着した接続要求を受け付けるのに使用されるソケットである。
-
-\fIsockfd\fP 引き数は、 \fBSOCK_STREAM\fP 型か \fBSOCK_SEQPACKET\fP
-型のソケットを参照するファイルディスクリプターである。
-
-\fIbacklog\fP 引き数は、 \fIsockfd\fP についての保留中の接続のキューの最大長を指定する。
-キューがいっぱいの状態で接続要求が到着すると、クライアントは \fBECONNREFUSED\fP
-というエラーを受け取る。下位層のプロトコルが再送信をサポート していれば、要求は無視され、これ以降の接続要求の再送信が成功するかもしれない。
-.SH 返り値
-成功した場合にはゼロが返される。エラー時には \-1 が返され、 \fIerrno\fP が適切に設定される。
-.SH エラー
-.TP 
-\fBEADDRINUSE\fP
-別のソケットが既に同じポートを listen している。
-.TP 
-\fBEADDRINUSE\fP
-(インターネットドメインソケットの場合) \fIsockfd\fP が参照するソケットがそれ以前にアドレスにバインドされておらず、
-そのソケットに一時ポートをバインドしようとした際に、 一時ポートとして使用する範囲のポート番号がすべて使用中であった。 \fBip\fP(7) の
-\fI/proc/sys/net/ipv4/ip_local_port_range\fP の議論を参照のこと。
-.TP 
-\fBEBADF\fP
-引き数 \fIsockfd\fP は有効なディスクリプターでない。
-.TP 
-\fBENOTSOCK\fP
-引き数 \fIsockfd\fP はソケットではない。
-.TP 
-\fBEOPNOTSUPP\fP
-ソケットは \fBlisten\fP()  がサポートしている型ではない。
-.SH 準拠
-4.4BSD, POSIX.1\-2001.  \fBlisten\fP()  関数は 4.2BSDで初めて実装された。
-.SH 注意
-接続を受け付けるには、以下の処理が実行される。
-.RS 4
-.IP 1. 4
-\fBsocket\fP(2)  でソケットを作成する。
-.IP 2.
-\fBbind\fP(2)  を使ってソケットにローカルアドレスを割り当てて、 他のソケットがこのソケットに \fBconnect\fP(2)  できるようにする。
-.IP 3.
-\fBlisten\fP()  を使って、接続要求を受け付ける意志と接続要求を入れるキュー長を指定する。
-.IP 4.
-\fBaccept\fP(2)  を使って接続を受け付ける。
-.RE
-.PP
-POSIX.1\-2001 では \fI<sys/types.h>\fP のインクルードは必須とされておらず、 Linux
-ではこのヘッダーファイルは必要ではない。 しかし、歴史的には、いくつかの実装 (BSD 系) でこのヘッダーファイルが
-必要であり、移植性が必要なアプリケーションではこのファイルを インクルードするのが賢明であろう。
-
-TCP ソケットでの \fIbacklog\fP 引き数の振る舞いは Linux 2.2 で変更された。 現在ではこの引き数は、
-受け付けられるのを待っている、 \fI完全に\fP 確立されたソケットのキューの長さを指定する。 以前は不完全な接続要求の数であったが、これを置き換えた。
-不完全なソケットのキューの最大長は \fI/proc/sys/net/ipv4/tcp_max_syn_backlog\fP を用いて設定できる。
-syncookie が有効になっている場合、 論理的な最大長は存在せず、この設定は無視される。
-
-.\" The following is now rather historic information (MTK, Jun 05)
-.\" Don't rely on this value in portable applications since BSD
-.\" (and some BSD-derived systems) limit the backlog to 5.
-\fIbacklog\fP 引き数が \fI/proc/sys/net/core/somaxconn\fP の値よりも大きければ、 \fIbacklog\fP
-の値は暗黙のうちにこの値に切り詰められる。 このファイルのデフォルト値は 128 である。 バージョン 2.4.5 以前のカーネルでは、この上限値は
-コード埋め込みの固定値 \fBSOMAXCONN\fP であり、その値は 128 であった。
-.SH 例
-\fBbind\fP(2)  参照。
-.SH 関連項目
-\fBaccept\fP(2), \fBbind\fP(2), \fBconnect\fP(2), \fBsocket\fP(2), \fBsocket\fP(7)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。