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

« back to all changes in this revision

Viewing changes to man/gSocketBind.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{gSocketBind}
 
2
\name{gSocketBind}
 
3
\title{gSocketBind}
 
4
\description{When a socket is created it is attached to an address family, but it
 
5
doesn't have an address in this family. \code{\link{gSocketBind}} assigns the
 
6
address (sometimes called name) of the socket.}
 
7
\usage{gSocketBind(object, address, allow.reuse, .errwarn = TRUE)}
 
8
\arguments{
 
9
\item{\verb{object}}{a \code{\link{GSocket}}.}
 
10
\item{\verb{address}}{a \code{\link{GSocketAddress}} specifying the local address.}
 
11
\item{\verb{allow.reuse}}{whether to allow reusing this address}
 
12
\item{.errwarn}{Whether to issue a warning on error or fail silently}
 
13
}
 
14
\details{It is generally required to bind to a local address before you can
 
15
receive connections. (See \code{\link{gSocketListen}} and \code{\link{gSocketAccept}} ).
 
16
In certain situations, you may also want to bind a socket that will be
 
17
used to initiate connections, though this is not normally required.
 
18
  \code{allow.reuse} should be \code{TRUE} for server sockets (sockets that you will
 
19
eventually call \code{\link{gSocketAccept}} on), and \code{FALSE} for client sockets.
 
20
(Specifically, if it is \code{TRUE}, then \code{\link{gSocketBind}} will set the
 
21
\code{SO_REUSEADDR} flag on the socket, allowing it to bind \code{address} even if
 
22
that address was previously used by another socket that has not yet been
 
23
fully cleaned-up by the kernel. Failing to set this flag on a server
 
24
socket may cause the bind call to return \code{G_IO_ERROR_ADDRESS_IN_USE} if
 
25
the server program is stopped and then immediately restarted.)
 
26
  Since 2.22}
 
27
\value{
 
28
A list containing the following elements:
 
29
\item{retval}{[logical] \code{TRUE} on success, \code{FALSE} 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}