~ubuntu-branches/ubuntu/trusty/rgtk2/trusty

« back to all changes in this revision

Viewing changes to man/gSocketSend.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-11-03 11:35:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101103113546-a7fi7jdxdebp0tw1
Tags: 2.20.1-1
* New upstream release

* debian/control: Set (Build-)Depends: to current R version
* debian/control: Set Standards-Version: to current version 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\alias{gSocketSend}
 
2
\name{gSocketSend}
 
3
\title{gSocketSend}
 
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)}
 
8
\arguments{
 
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}
 
14
}
 
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.)
 
23
  
 
24
On error -1 is returned and \code{error} is set accordingly.
 
25
  Since 2.22}
 
26
\value{
 
27
A list containing the following elements:
 
28
\item{retval}{[integer]  Number of bytes written (which may be less than \code{size}), or -1
 
29
on error}
 
30
\item{\verb{error}}{\code{\link{GError}} for error reporting, or \code{NULL} to ignore.}
 
31
}
 
32
\author{Derived by RGtkGen from GTK+ documentation}
 
33
\keyword{internal}