| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/context.R, R/listdial.R, R/ncurl.R, |
| 3 |
% R/server.R, R/socket.R, R/stream.R |
| 4 |
\name{close.nanoContext} |
| 5 |
\alias{close.nanoContext} |
| 6 |
\alias{close.nanoDialer} |
| 7 |
\alias{close.nanoListener} |
| 8 |
\alias{close.ncurlSession} |
| 9 |
\alias{close.nanoServer} |
| 10 |
\alias{close} |
| 11 |
\alias{close.nanoSocket} |
| 12 |
\alias{close.nanoStream} |
| 13 |
\title{Close Connection} |
| 14 |
\usage{ |
| 15 |
\method{close}{nanoContext}(con, ...) |
| 16 |
|
| 17 |
\method{close}{nanoDialer}(con, ...) |
| 18 |
|
| 19 |
\method{close}{nanoListener}(con, ...) |
| 20 |
|
| 21 |
\method{close}{ncurlSession}(con, ...) |
| 22 |
|
| 23 |
\method{close}{nanoServer}(con, ...) |
| 24 |
|
| 25 |
\method{close}{nanoSocket}(con, ...) |
| 26 |
|
| 27 |
\method{close}{nanoStream}(con, ...) |
| 28 |
} |
| 29 |
\arguments{ |
| 30 |
\item{con}{a Socket, Context, Dialer, Listener, Stream, or 'ncurlSession'.} |
| 31 |
|
| 32 |
\item{...}{not used.} |
| 33 |
} |
| 34 |
\value{ |
| 35 |
Invisibly, an integer exit code (zero on success). |
| 36 |
} |
| 37 |
\description{ |
| 38 |
Close Connection on a Socket, Context, Dialer, Listener, Stream, Pipe, or |
| 39 |
ncurl Session. |
| 40 |
} |
| 41 |
\details{ |
| 42 |
Closing an object explicitly frees its resources. An object can also be |
| 43 |
removed directly in which case its resources are freed when the object is |
| 44 |
garbage collected. |
| 45 |
|
| 46 |
Closing a Socket associated with a Context also closes the Context. |
| 47 |
|
| 48 |
Dialers and Listeners are implicitly closed when the Socket they are |
| 49 |
associated with is closed. |
| 50 |
|
| 51 |
Closing a Socket or a Context: messages that have been submitted for sending |
| 52 |
may be flushed or delivered, depending upon the transport. Closing the Socket |
| 53 |
while data is in transmission will likely lead to loss of that data. There is |
| 54 |
no automatic linger or flush to ensure that the Socket send buffers have |
| 55 |
completely transmitted. |
| 56 |
|
| 57 |
Closing a Stream: if any send or receive operations are pending, they will be |
| 58 |
terminated and any new operations will fail after the connection is closed. |
| 59 |
|
| 60 |
Closing an 'ncurlSession' closes the http(s) connection. |
| 61 |
} |
| 62 |
\seealso{ |
| 63 |
\code{\link[=reap]{reap()}} |
| 64 |
} |