1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

(Network Sockets and Communication): In socket, use

@defvar for protocol variables, cross reference for getprotobyname,
note it's usually connect and accept that establishes communication.
This commit is contained in:
Kevin Ryde 2003-08-29 23:13:48 +00:00
parent 497cbe2084
commit 3dba2dd97b

View file

@ -2174,25 +2174,30 @@ in host order.
@deffn {Scheme Procedure} socket family style proto @deffn {Scheme Procedure} socket family style proto
@deffnx {C Function} scm_socket (family, style, proto) @deffnx {C Function} scm_socket (family, style, proto)
@vindex PF_UNIX
@vindex PF_INET
@vindex PF_INET6
@vindex SOCK_STREAM
@vindex SOCK_DGRAM
@vindex SOCK_RAW
Return a new socket port of the type specified by @var{family}, Return a new socket port of the type specified by @var{family},
@var{style} and @var{proto}. All three parameters are @var{style} and @var{proto}. All three parameters are integers. The
integers. Supported values for @var{family} are possible values for @var{family} are as follows, where supported by
@code{PF_UNIX}, @code{PF_INET} and @code{PF_INET6}. the system,
Typical values for @var{style} are @code{SOCK_STREAM},
@code{SOCK_DGRAM} and @code{SOCK_RAW}. @defvar PF_UNIX
@defvarx PF_INET
@defvarx PF_INET6
@end defvar
The possible values for @var{style} are as follows, again where
supported by the system,
@defvar SOCK_STREAM
@defvarx SOCK_DGRAM
@defvarx SOCK_RAW
@end defvar
@var{proto} can be obtained from a protocol name using @var{proto} can be obtained from a protocol name using
@code{getprotobyname}. A value of zero specifies the default @code{getprotobyname} (@pxref{Network Databases}). A value of zero
protocol, which is usually right. means the default protocol, which is usually right.
A single socket port cannot by used for communication until it A socket cannot by used for communication until it has been connected
has been connected to another socket. somewhere, usually with either @code{connect} or @code{accept} below.
@end deffn @end deffn
@deffn {Scheme Procedure} socketpair family style proto @deffn {Scheme Procedure} socketpair family style proto