---
name: "rpcstream"
section: "3"
platform: "linux"
package: "ivtools-dev"
version: "1.1.3-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/rpcstream"
---

# rpcstream(3)

iostreamb specialized to RPC requests

## NAME

rpcstream - iostreamb specialized to RPC requests

## SYNOPSIS

**#include \<Dispatch/rpcstream.h\>**

## DESCRIPTION

rpcstream, irpcstream, and orpcstream specialize iostream, istream, and ostream, respectively, to RPC requests.  That is, the associated streambuf will be an rpcbuf.  Conversions will be formatted (that is, ASCII) so datums will need to be separated by space characters.

## CONSTRUCTORS

- **rpcstream()**

  Construct an unopened rpcstream.

## PUBLIC OPERATIONS

- **void listen(int port)**

  - **void connect(const char\* host, int port)**

  Create a connection.  Any failure sets ios::failbit in the error state.

- **int accept()**

  Accept a pending connection and return the new file descriptor.

- **void attach(int fd)**

  Attach to a pre-existing connection.

- **void close()**

  Break a connection.  The error state is cleared except on failure.

- **void nonblocking(boolean)**

  - **void verbose(boolean)**

  Enable or disable non-blocking I/O and/or printing of error messages.

- **rpcbuf\* rdbuf()**

  Return a pointer to the rpcbuf created by the rpcstream.

- **boolean incomplete\_request()**

  - **void incomplete\_request(boolean)**

  Get or set a flag.  Used by the operations that insert an RpcHdr into an rpcstream or extract an RpcHdr from an rpcstream.

## SEE ALSO

IOS.INTRO(3C++), iostreamb(3I), rpcbuf(3I)
