MINOR: connection: add new error codes for accept_conn()

accept_conn() will be used to accept an incoming connection and return it.
It will have to deal with various error codes. The currently identified
ones were created as CO_AC_*.
This commit is contained in:
Willy Tarreau 2020-10-15 08:23:57 +02:00
parent 01ca149047
commit 65ed143841

View File

@ -243,6 +243,16 @@ enum {
CO_ER_SOCKS4_ABORT, /* SOCKS4 Proxy handshake aborted by server */
};
/* error return codes for accept_conn() */
enum {
CO_AC_NONE = 0, /* no error, valid connection returned */
CO_AC_DONE, /* reached the end of the queue (typically EAGAIN) */
CO_AC_RETRY, /* late signal delivery or anything requiring the caller to try again */
CO_AC_YIELD, /* short-lived limitation that requires a short pause */
CO_AC_PAUSE, /* long-lived issue (resource/memory allocation error, paused FD) */
CO_AC_PERMERR, /* permanent, non-recoverable error (e.g. closed listener socket) */
};
/* source address settings for outgoing connections */
enum {
/* Tproxy exclusive values from 0 to 7 */