4
\description{Tries to send \code{size} bytes from \code{buffer} on the socket. This is
5
mainly used by connection-oriented sockets; it is identical to
6
\code{\link{gSocketSendTo}} with \code{address} set to \code{NULL}.}
7
\usage{gSocketSend(object, buffer, size, cancellable = NULL, .errwarn = TRUE)}
9
\item{\verb{object}}{a \code{\link{GSocket}}}
10
\item{\verb{buffer}}{the buffer containing the data to send.}
11
\item{\verb{size}}{the number of bytes to send}
12
\item{\verb{cancellable}}{a \code{\link{GCancellable}} or \code{NULL}}
13
\item{.errwarn}{Whether to issue a warning on error or fail silently}
15
\details{If the socket is in blocking mode the call will block until there is
16
space for the data in the socket queue. If there is no space available
17
and the socket is in non-blocking mode a \code{G_IO_ERROR_WOULD_BLOCK} error
18
will be returned. To be notified when space is available, wait for the
19
\code{G_IO_OUT} condition. Note though that you may still receive
20
\code{G_IO_ERROR_WOULD_BLOCK} from \code{\link{gSocketSend}} even if you were previously
21
notified of a \code{G_IO_OUT} condition. (On Windows in particular, this is
22
very common due to the way the underlying APIs work.)
24
On error -1 is returned and \code{error} is set accordingly.
27
A list containing the following elements:
28
\item{retval}{[integer] Number of bytes written (which may be less than \code{size}), or -1
30
\item{\verb{error}}{\code{\link{GError}} for error reporting, or \code{NULL} to ignore.}
32
\author{Derived by RGtkGen from GTK+ documentation}