aboutsummaryrefslogtreecommitdiffstats
path: root/libcoopgamma_flush.3
blob: 8ffaae2f8930a3bdf1341c92468d2d87c2c9de77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.TH LIBCOOPGAMMA_FLUSH 3 LIBCOOPGAMMA
.SH "NAME"
libcoopgamma_flush - Send all pending outbound data
.SH "SYNOPSIS"
.nf
#include <libcoopgamma.h>

int libcoopgamma_flush(libcoopgamma_context_t *restrict \fIctx\fP);
.fi
.P
Link with
.IR -lcoopgamma .
.SH "DESCRIPTION"
The
.BR libcoopgamma_flush ()
function sends all data on
.I ctx
that have not yet been sent because of
interruption or similar.
.SH "RETURN VALUES"
Upon successful completion, the
.BR libcoopgamma_flush ()
function returns 0. On error, -1 is returned and
.I errno
is set appropriately.
.SH "ERRORS"
The
.BR libcoopgamma_flush ()
function may fail for any reason specified for
.BR send (3).
Particularly interesting exceptional
conditions, that are not errors proper, include
those indicated by the following values on
.IR errno :
.TP
.B EINTR
The function was interrupted by a signal. When
this happens, just resume be calling the functon
again.
.TP
.BR EAGAIN " or " EWOULDBLOCK
The communication is nonblocking and the buffer
between the server and the client is full,
and no more data can be queued without blocking.
When this happens, wait a short period of time
and call the function again to resume.
.BR select (3)
or similar function can be used to wait until
.I ctx->fd
is writable.
.SH "SEE ALSO"
.BR libcoopgamma_synchronise (3),
.BR libcoopgamma_set_nonblocking (3),
.BR libcoopgamma_connect (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)