?? send.3.man
字號(hào):
'\" rtp.\" -*- nroff -*- vim: ft=nroff noautoindent nocindent nosmartindent.\".\" @(#) send.3.man,v 1.1.2.1 2004/05/16 02:35:35 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004 OpenSS7 Corporation <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date. The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein. The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" -------------------------------------------------------------------------.\".\" U.S. GOVERNMENT RESTRICTED RIGHTS. If you are licensing this Software.\" on behalf of the U.S. Government ("Government"), the following.\" provisions apply to you. If the Software is supplied by the Department.\" of Defense ("DoD"), it is classified as "Commercial Computer Software".\" under paragraph 252.227-7014 of the DoD Supplement to the Federal.\" Acquisition Regulations ("DFARS") (or any successor regulations) and the.\" Government is acquiring only the license rights granted herein (the.\" license rights customarily provided to non-Government users). If the.\" Software is supplied to any unit or agency of the Government other than.\" DoD, it is classified as "Restricted Computer Software" and the.\" Government's rights in the Software are defined in paragraph 52.227-19.\" of the Federal Acquisition Regulations ("FAR") (or any success.\" regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the.\" NASA Supplement to the FAR (or any successor regulations)..\".\" =========================================================================.\" .\" Commercial licensing and support of this software is available from.\" OpenSS7 Corporation at a fee. See http://www.openss7.com/.\" .\" =========================================================================.\".\" Last Modified 2004/05/16 02:35:35 by brian.\".\" =========================================================================.so strxnet.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase strxnet.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".\".\".TH SEND 3 "2004/05/16 02:35:35" "strxnet-0_9_2-4" "Linux Fast-STREAMS Sockets Library".SH NAME.B send\- send a message on a socket.SH SYNOPSIS.PP.B #include <sys/socket.h>.HP.BI "ssize_t send(int " socket ", const void *" buffer ", size_t " length ", int " flags );.SH DESCRIPTION.PP.TP.I socketSpecifies the socket file descriptor..TP.I bufferPoints to the buffer containing the message to send..TP.I lengthSpecifies the length of the message in bytes..TP.I flagsSpecifies the type of message transmission. Values of this argument are formedby logically OR'ing zero or more of the following flags:.RS.TP.B MSG_EORTerminates a record (if supported by the protocol).TP.B MSG_OOBSends out-of-band data on sockets that support out-of-band communications. Thesignificance and semantics of out-of-band data are protocol-specific..RE.PPThe.BR send ()function initiates transmission of a message from the specifiedsocket to its peer. The.BR send ()function sends a message only when the socketis connected (including when the peer of a connectionless socket has been setvia.BR connect (3))..PPThe length of the message to be sent is specified by the.I lengthargument. Ifthe message is too long to pass through the underlying protocol,.BR send ()failsand no data is transmitted..PPSuccessful completion of a call to.BR send ()does not guarantee delivery of themessage. A return value of -1 indicates only locally-detected errors..PPIf space is not available at the sending socket to hold the message to betransmitted and the socket file descriptor does not have.B O_NONBLOCKset,.BR send ()blocks until space is available. If space is not available at thesending socket to hold the message to be transmitted and the socket filedescriptor does have.B O_NONBLOCKset,.BR send ()will fail. The.BR select (2)and.BR poll (2)functions can be used to determine when it is possible to send moredata..PPThe socket in use may require the process to have appropriate privileges touse the.BR send ()function..SH NOTES.PPThe.BR send ()function is identical to.BR sendto (3)with a null pointer dest_lenargument, and to.BR write (2)if no.I flagsare used..SH CAVEATS.PPThis system call is implemented as a.B SIOCSOCKSYSIOCTL. See.BR socksys (4)for more information..SH CAVEATS.PPThis system call is implemented as a.B SIOCSOCKSYSIOCTL. See.BR socksys (4)for more information..SH "RETURN VALUE".PPUpon successful completion,.BR send ()returns the number of bytes sent.Otherwise, -1 is returned and errno is set to indicate the error..SH ERRORS.PPThe.BR send ()function will fail if:.TP.RB [ EAGAIN "] or [" EWOULDBLOCK ]The socket's file descriptor is marked.B O_NONBLOCKand therequested operation would block..TP.RB [ EBADF ]The.I socketargument is not a valid file descriptor..TP.RB [ ECONNRESET ]A connection was forcibly closed by a peer..TP.RB [ EDESTADDRREQ ]The socket is not connection-mode and no peer address is set..TP.RB [ EFAULT ]The.I bufferparameter can not be accessed..TP.RB [ EINTR ]A signal interrupted.BR send ()before any data was transmitted..TP.RB [ EMSGSIZE ]The message is too large be sent all at once, as the socketrequires..TP.RB [ ENOTCONN ]The socket is not connected or otherwise has not had the peerprespecified..TP.RB [ ENOTSOCK ]The.I socketargument does not refer to a socket..TP.RB [ EOPNOTSUPP ]The.I socketargument is associated with a socket that does notsupport one or more of the values set in.IR flags ..TP.RB [ EPIPE ]The socket is shut down for writing, or the socket isconnection-mode and is no longer connected. In the latter case,and if the socket is of type.BR SOCK_STREAM ,the.B SIGPIPEsignal isgenerated to the calling process..PPThe.BR send ()function may fail if:.TP.RB [ EACCES ]The calling process does not have the appropriate privileges..TP.RB [ EIO ]An I/O error occurred while reading from or writing to the filesystem..TP.RB [ ENETDOWN ]The local interface used to reach the destination is down..TP.RB [ ENETUNREACH ]No route to the network is present..TP.RB [ ENOBUFS ]Insufficient resources were available in the system to performthe operation..TP.RB [ ENOSR ]There were insufficient.IR STREAMS (4)resources available for theoperation to complete..SH "SEE ALSO".PP.BR connect (3),.BR getsockopt (3),.BR poll (2),.BR recv (3),.BR recvfrom (3),.BR recvmsg (3),.BR select (2),.BR sendmsg (3),.BR sendto (3),.BR setsockopt (3),.BR shutdown (3),.BR socket (3),.BR <sys/socket.h> (5)..SH "CONFORMING TO".PPThe Open Group XNS Issue 5.2..[xns.].\".\".[$LIST$.].TI
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -