File: gSocketConnect.Rd

package info (click to toggle)
rgtk2 2.20.36-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 33,540 kB
  • sloc: ansic: 137,163; makefile: 2; sh: 1
file content (33 lines) | stat: -rw-r--r-- 1,539 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
\alias{gSocketConnect}
\name{gSocketConnect}
\title{gSocketConnect}
\description{Connect the socket to the specified remote address.}
\usage{gSocketConnect(object, address, cancellable = NULL, .errwarn = TRUE)}
\arguments{
\item{\verb{object}}{a \code{\link{GSocket}}.}
\item{\verb{address}}{a \code{\link{GSocketAddress}} specifying the remote address.}
\item{\verb{cancellable}}{a \code{\link{GCancellable}} or \code{NULL}}
\item{.errwarn}{Whether to issue a warning on error or fail silently}
}
\details{For connection oriented socket this generally means we attempt to make
a connection to the \code{address}. For a connection-less socket it sets
the default address for \code{\link{gSocketSend}} and discards all incoming datagrams
from other sources.
  
Generally connection oriented sockets can only connect once, but
connection-less sockets can connect multiple times to change the
default address.
  
If the connect call needs to do network I/O it will block, unless
non-blocking I/O is enabled. Then \code{G_IO_ERROR_PENDING} is returned
and the user can be notified of the connection finishing by waiting
for the G_IO_OUT condition. The result of the connection can then be
checked with \code{\link{gSocketCheckConnectResult}}.
  Since 2.22}
\value{
A list containing the following elements:
\item{retval}{[logical] \code{TRUE} if connected, \code{FALSE} on error.}
\item{\verb{error}}{\code{\link{GError}} for error reporting, or \code{NULL} to ignore.}
}
\author{Derived by RGtkGen from GTK+ documentation}
\keyword{internal}