summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/proto.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-02-02 15:46:28 +0000
committerpjd <pjd@FreeBSD.org>2011-02-02 15:46:28 +0000
commit1267c20f911e08de277a22060d9bc42148f9afc0 (patch)
tree14572a6733b1467ecd161cefb488eb923dad681b /sbin/hastd/proto.h
parent3acb629cd228ce6366df06b502aea7ca95055b91 (diff)
downloadFreeBSD-src-1267c20f911e08de277a22060d9bc42148f9afc0.zip
FreeBSD-src-1267c20f911e08de277a22060d9bc42148f9afc0.tar.gz
Add proto_connect_wait() to wait for connection to finish.
If timeout argument to proto_connect() is -1, then the caller needs to use this new function to wait for connection. This change is in preparation for capsicum, where sandboxed worker wants to ask main process to connect in worker's behalf and pass descriptor to the worker. Because we don't want the main process to wait for the connection, it will start async connection and pass descriptor to the worker who will be responsible for waiting for the connection to finish. MFC after: 1 week
Diffstat (limited to 'sbin/hastd/proto.h')
-rw-r--r--sbin/hastd/proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/hastd/proto.h b/sbin/hastd/proto.h
index f4719e6..39beb3f 100644
--- a/sbin/hastd/proto.h
+++ b/sbin/hastd/proto.h
@@ -39,6 +39,7 @@ struct proto_conn;
int proto_client(const char *addr, struct proto_conn **connp);
int proto_connect(struct proto_conn *conn, int timeout);
+int proto_connect_wait(struct proto_conn *conn, int timeout);
int proto_server(const char *addr, struct proto_conn **connp);
int proto_accept(struct proto_conn *conn, struct proto_conn **newconnp);
int proto_send(const struct proto_conn *conn, const void *data, size_t size);
OpenPOWER on IntegriCloud