+\f
+/* Stream-based vconns and pvconns. */
+
+#define DEFINE_VCONN_STREAM_CLASS(NAME) \
+ struct vconn_class NAME##_vconn_class = { \
+ #NAME, \
+ vconn_stream_open, \
+ vconn_stream_close, \
+ vconn_stream_connect, \
+ vconn_stream_recv, \
+ vconn_stream_send, \
+ vconn_stream_run, \
+ vconn_stream_run_wait, \
+ vconn_stream_wait, \
+ };
+
+#define DEFINE_PVCONN_STREAM_CLASS(NAME) \
+ struct pvconn_class NAME##_pvconn_class = { \
+ #NAME, \
+ pvconn_pstream_listen, \
+ pvconn_pstream_close, \
+ pvconn_pstream_accept, \
+ pvconn_pstream_wait \
+ };
+
+static DEFINE_VCONN_STREAM_CLASS(stream);
+static DEFINE_PVCONN_STREAM_CLASS(pstream);
+
+DEFINE_VCONN_STREAM_CLASS(tcp);
+DEFINE_PVCONN_STREAM_CLASS(ptcp);
+
+DEFINE_VCONN_STREAM_CLASS(unix);
+DEFINE_PVCONN_STREAM_CLASS(punix);
+
+#ifdef HAVE_OPENSSL
+DEFINE_VCONN_STREAM_CLASS(ssl);
+DEFINE_PVCONN_STREAM_CLASS(pssl);
+#endif