#ifndef STREAM_H
#define STREAM_H 1
-#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
-#include "flow.h"
-
struct pstream;
struct stream;
-void stream_usage(const char *name, bool active, bool passive);
+void stream_usage(const char *name, bool active, bool passive, bool bootstrap);
/* Bidirectional byte streams. */
int stream_open(const char *name, struct stream **);
int stream_recv(struct stream *, void *buffer, size_t n);
int stream_send(struct stream *, const void *buffer, size_t n);
+void stream_run(struct stream *);
+void stream_run_wait(struct stream *);
+
enum stream_wait_type {
STREAM_CONNECT,
STREAM_RECV,