Skip to contents

This class represents a server running one application that listens on a named pipe.

See also

Super class

httpuv::Server -> PipeServer

Methods

Inherited methods


Method new()

Initialize a new PipeServer object

Create a new PipeServer object. app is an httpuv application object as described in startServer().

Usage

PipeServer$new(name, mask, app, quiet = FALSE)

Arguments

name

The name of the named pipe to bind the server to.

mask

The mask for the named pipe. If NULL, it defaults to -1.

app

An httpuv application object as described in startServer().

quiet

If TRUE, suppresses output from the server.

Returns

A new PipeServer object.

Examples

\dontrun{
# Create a simple app
app <- function(req) {
  list(
    status = 200L,
    headers = list('Content-Type' = 'text/plain'),
    body = "Hello, world!"
  )
}
# Create a server
server <- PipeServer$new("my_pipe", -1, app)
}


Method getName()

Get the name of the named pipe

Usage

PipeServer$getName()

Returns

The name of the named pipe that the server is bound to.


Method getMask()

Get the mask for the named pipe

Usage

PipeServer$getMask()

Returns

The mask for the named pipe that the server is bound to.

Examples


## ------------------------------------------------
## Method `PipeServer$new`
## ------------------------------------------------

if (FALSE) { # \dontrun{
# Create a simple app
app <- function(req) {
  list(
    status = 200L,
    headers = list('Content-Type' = 'text/plain'),
    body = "Hello, world!"
  )
}
# Create a server
server <- PipeServer$new("my_pipe", -1, app)
} # }