Make a guess:


RpcWriter::RpcWriter(
    const char* host, int port, bool fatal, bool binary
) :
    _server(new rpcstream),
    _delete(true),
    _host(nil)
{
    server().verbose(fatal);
    server().connect(host, port);
    server().negotiate(binary);

    if (!server() && fatal) {
	abort();
    }
}

RpcWriter::RpcWriter(int fd, bool fatal, bool binary) :
    _server(new rpcstream),
    _delete(true),
    _host(nil)
{
    server().verbose(fatal);
    server().attach(fd);
    server().negotiate(binary);

    if (!server() && fatal) {
	abort();
    }
}

RpcWriter::RpcWriter(rpcstream* server) :
    _server(server),
    _delete(false),
    _host(nil) {}

// Close the connection to the server, although the file number won't
// be closed if we attached the connection to it.  Free any storage
// allocated by RpcRegistry::find for the host name.

RpcWriter::~RpcWriter() {
    if (_delete) {
	delete _server;
    }
    delete _host;
}

// Use a member function to open a connection to an RPC service at its
// registered host name and port number so that a derived class's
// constructor can retry the attempt if necessary.

void RpcWriter::open(const char* path, bool fatal, bool binary) {
    int port;

    if (RpcRegistry::find(path, _host, port)) {
	server().verbose(fatal);
	server().connect(_host, port);
	server().negotiate(binary);
    } else {
	server().clear(ios::failbit | ios::badbit);
    }

    if (!server() && fatal) {
	cerr << "RpcWriter::open: service " << path << " not found" << "\n";
	cerr.flush();
	abort();
    }
}