aboutsummaryrefslogtreecommitdiffstats
path: root/libcoopgamma_connect.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-10-22 18:59:27 +0200
committerMattias Andrée <maandree@kth.se>2019-10-22 18:59:27 +0200
commitbf4020471356938b9181a33984f511ffdd7ff25b (patch)
tree7f9a9abd1ae51318cd435f0ed7471be5f33b478c /libcoopgamma_connect.3
parentList radharc's priority (diff)
downloadlibcoopgamma-bf4020471356938b9181a33984f511ffdd7ff25b.tar.gz
libcoopgamma-bf4020471356938b9181a33984f511ffdd7ff25b.tar.bz2
libcoopgamma-bf4020471356938b9181a33984f511ffdd7ff25b.tar.xz
Change license, change style, clean up, flat file hier, clean valgrind output in test
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libcoopgamma_connect.3')
-rw-r--r--libcoopgamma_connect.378
1 files changed, 78 insertions, 0 deletions
diff --git a/libcoopgamma_connect.3 b/libcoopgamma_connect.3
new file mode 100644
index 0000000..594d43f
--- /dev/null
+++ b/libcoopgamma_connect.3
@@ -0,0 +1,78 @@
+.TH LIBCOOPGAMMA_CONNECT 3 LIBCOOPGAMMA
+.SH "NAME"
+libcoopgamma_connect - Connect to a coopgamma server
+.SH "SYNOPSIS"
+.nf
+#include <libcoopgamma.h>
+
+int libcoopgamma_connect(const char *restrict \fImethod\fP, const char *restrict \fIsite\fP,
+ libcoopgamma_context_t *restrict \fIctx\fP);
+.fi
+.P
+Link with
+.IR -lcoopgamma .
+.SH "DESCRIPTION"
+The
+.BR libcoopgamma_connect ()
+function connects to the instance coopgamma server
+for the selected adjustment
+.I method
+and
+.IR site .
+If the server is not already running, it will be started. If
+.I method
+or
+.I site
+is
+.IR NULL ,
+the it will selected automatically.
+The state of the connection is stored in
+.IR ctx ,
+which must be initialised but not already connected.
+.I ctx
+can be initialised with
+.BR libcoopgamma_context_initialise (3).
+.P
+For the duration of the function call,
+.I SIGCHLD
+most neither be ignored nor blocked. It is the
+user of this library's responsibility to ensure
+this. The
+.BR libcoopgamma_connect ()
+function will not temporarily reset handling of
+.I SIGCHLD
+itself.
+.SH "RETURN VALUES"
+Upon successful completion, the
+.BR libcoopgamma_connect ()
+function returns 0. On error, -1 is returned and
+.I errno
+is set appropriately.
+.SH "ERRORS"
+The
+.BR libcoopgamma_connect ()
+function may fail for any reason specified for
+.BR libcoopgamma_get_socket_file (3),
+.BR socket (3),
+.BR waitpid (3),
+and
+.BR connect (3).
+The function may also fail for any of the
+following reasons:
+.TP
+.B ENAMETOOLONG
+The pathname of the socket was too long.
+.TP
+.B 0
+The server failed to initialise.
+.SH "SEE ALSO"
+.BR libcoopgamma_get_methods (3),
+.BR libcoopgamma_get_pid_file (3),
+.BR libcoopgamma_get_socket_file (3),
+.BR libcoopgamma_context_initialise (3),
+.BR libcoopgamma_context_destroy (3),
+.BR libcoopgamma_set_nonblocking (3),
+.BR libcoopgamma_get_crtcs_send (3),
+.BR libcoopgamma_get_gamma_info_send (3),
+.BR libcoopgamma_get_gamma_send (3),
+.BR libcoopgamma_set_gamma_send (3)