SYNOPSIS

#include <mongoc.h>

mongoc_stream_t * stream;

stream = mongoc_stream_new(stream_string);

DESCRIPTION

mongoc_stream provides a generic streaming IO abstraction based on a struct of pointers interface. The idea is to allow wrappers, perhaps other language drivers, to easily shim their IO system on top of mongoc.

The API for the stream abstraction is currently private and non-extensible.

STREAM TYPES

There are a number of built in stream types that come with mongoc. The default configuration is a buffered unix stream. If SSL is in use, that in turn is wrapped in a tls stream.

BUFFERED

A basic buffered stream that minimizes network round trips

GRIDFS

An abstraction on top of the mongoc_gridfs(7).

TLS

OpenSSL based TLS support with x509 certificate verification.

The TLS stream type has a few non-standard methods that involve negotiating the SSL handshake and cert verification.

FILE

A stream for communicating with local files on disk.

SOCKET

The primary stream interface. This is used for communicating with a a peer over an AF_INET, AF_INET6, or AF_UNIX socket.

SEE ALSO

AUTHORS

This page was written by MongoDB Inc.