Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../.././../usr/include/rad/adr_stream.h
Real path: /usr/include/rad/adr_stream.h
Zurück
/* * Copyright (c) 2012, 2022, Oracle and/or its affiliates. */ #ifndef _ADR_STREAM_H #define _ADR_STREAM_H #include <sys/types.h> #include <stdlib.h> #include <stdarg.h> #include <stddef.h> #include <string.h> #include <errno.h> #include <rad/adr.h> #ifdef __cplusplus extern "C" { #endif /* * A UNIX file descriptor normally is a sufficient abstraction for a * connection. Unfortunately, complex layered protocols like SSL * require some sort of userland linkage, and short of creating pipes * to ourselves and threads to service them, we are no longer able to * use file descriptors alone. * * Here we define a basic stream abstraction. It supports for basic * operations: read, write, close, and free. read, write, and close * are expected to be asynchronously callable. Traditionally, close * and free were combined in close(2), but here we separate them so * that streams can be closed in one thread while others are reading or * writing without risk of use-after-free. free is obviously not * asynchronously callable. * * Note: this functionality doesn't really fit in libadr, but is * required by both protocol-independent portions of the rad daemon and * by the rad protocol client code. To economize on libraries we are * putting its implementation here until there is a critical mass of * similar functionality. */ typedef struct adr_stream adr_stream_t; adr_stream_t *adr_stream_create(ssize_t (*)(void *, char *, size_t), ssize_t (*)(void *, const char *, size_t), void (*)(void *), void (*)(void *), int (*)(void *, int, int *, int *), int (*)(void *), void *); int adr_stream_get_fd(adr_stream_t *); ssize_t adr_stream_read(adr_stream_t *, char *, size_t); ssize_t adr_stream_write(adr_stream_t *, const char *, size_t); int adr_stream_wait(adr_stream_t *, int *, int *); void adr_stream_close(adr_stream_t *); void adr_stream_free(adr_stream_t *); /* token manipulation */ enum token_status { TOK_OK, /* no error */ TOK_COMPLETE, /* complete token written/read */ TOK_EOF, /* eof on host */ TOK_ERR, /* error */ TOK_EAG /* EAGAIN */ }; typedef enum token_status token_status_t; #ifdef __cplusplus } #endif #endif /* _ADR_STREAM_H */