VLC 4.0.0-dev
|
Transport-layer stream abstraction. More...
Data Structures | |
struct | vlc_tls_socket |
Macros | |
#define | SOL_TCP IPPROTO_TCP |
Typedefs | |
typedef struct vlc_tls_socket | vlc_tls_socket_t |
Functions | |
ssize_t | vlc_tls_Read (vlc_tls_t *session, void *buf, size_t len, bool waitall) |
Receives data through a socket. | |
ssize_t | vlc_tls_Write (vlc_tls_t *session, const void *buf, size_t len) |
Sends data through a socket. | |
char * | vlc_tls_GetLine (vlc_tls_t *session) |
Receives a text line through a socket. | |
static int | vlc_tls_SocketGetFD (vlc_tls_t *tls, short *restrict events) |
static ssize_t | vlc_tls_SocketRead (vlc_tls_t *tls, struct iovec *iov, unsigned count) |
static ssize_t | vlc_tls_SocketWrite (vlc_tls_t *tls, const struct iovec *iov, unsigned count) |
static int | vlc_tls_SocketShutdown (vlc_tls_t *tls, bool duplex) |
static void | vlc_tls_SocketClose (vlc_tls_t *tls) |
static vlc_tls_t * | vlc_tls_SocketAlloc (int fd, const struct sockaddr *restrict peer, socklen_t peerlen) |
vlc_tls_t * | vlc_tls_SocketOpen (int fd) |
Creates a transport-layer stream from a socket. | |
int | vlc_tls_SocketPair (int family, int protocol, vlc_tls_t *pair[2]) |
Creates a connected pair of transport-layer sockets. | |
static vlc_tls_t * | vlc_tls_SocketAddrInfo (const struct addrinfo *restrict info) |
Allocates an unconnected transport layer socket. | |
static int | vlc_tls_WaitConnect (vlc_tls_t *tls) |
Waits for pending transport layer socket connection. | |
static ssize_t | vlc_tls_Connect (vlc_tls_t *tls) |
Connects a transport layer socket. | |
static ssize_t | vlc_tls_ConnectWrite (vlc_tls_t *tls, const struct iovec *iov, unsigned count) |
vlc_tls_t * | vlc_tls_SocketOpenAddrInfo (const struct addrinfo *restrict info, bool defer_connect) |
vlc_tls_t * | vlc_tls_SocketOpenTCP (vlc_object_t *obj, const char *name, unsigned port) |
Creates a transport-layer TCP stream from a name and port. | |
Variables | |
static const struct vlc_tls_operations | vlc_tls_socket_ops |
static const struct vlc_tls_operations | vlc_tls_socket_fastopen_ops |
Transport-layer stream abstraction.
This file implements the transport-layer stream (vlc_tls) abstraction.
#define SOL_TCP IPPROTO_TCP |
typedef struct vlc_tls_socket vlc_tls_socket_t |
|
static |
Connects a transport layer socket.
References vlc_tls_socket::fd, vlc_tls_socket::peer, vlc_tls_socket::peerlen, and vlc_tls_WaitConnect().
Referenced by vlc_tls_ConnectWrite(), and vlc_tls_SocketOpenAddrInfo().
|
static |
|
static |
Allocates an unconnected transport layer socket.
References net_Close, SOL_TCP, unlikely, vlc_socket(), and vlc_tls_SocketAlloc().
Referenced by vlc_tls_SocketOpenAddrInfo().
|
static |
References vlc_tls_socket::fd, vlc_tls::ops, vlc_tls::p, vlc_tls_socket::peer, vlc_tls_socket::peerlen, vlc_tls_socket::tls, unlikely, and vlc_tls_socket_ops.
Referenced by vlc_tls_SocketAddrInfo(), vlc_tls_SocketOpen(), and vlc_tls_SocketPair().
|
static |
References vlc_tls_socket::fd, net_Close, and vlc_tls_socket::tls.
|
static |
References vlc_tls_socket::fd, and vlc_tls_socket::tls.
vlc_tls_t * vlc_tls_SocketOpenAddrInfo | ( | const struct addrinfo *restrict | info, |
bool | defer_connect | ||
) |
References vlc_tls::ops, vlc_tls_Connect(), vlc_tls_SessionDelete(), vlc_tls_socket_fastopen_ops, and vlc_tls_SocketAddrInfo().
Referenced by vlc_h1_request(), vlc_tls_SocketOpenTCP(), and vlc_tls_SocketOpenTLS().
|
static |
References count, vlc_tls_socket::fd, recvmsg(), and vlc_tls_socket::tls.
|
static |
References vlc_tls_socket::fd, and vlc_tls_socket::tls.
|
static |
References count, vlc_tls_socket::fd, vlc_tls_socket::tls, and vlc_sendmsg().
Referenced by vlc_tls_ConnectWrite().
|
static |
Waits for pending transport layer socket connection.
References pollfd::events, pollfd::fd, POLLOUT, vlc_killed(), vlc_poll_i11e(), and vlc_tls_GetFD().
Referenced by vlc_tls_Connect(), and vlc_tls_ConnectWrite().
|
static |
Referenced by vlc_tls_SocketOpenAddrInfo().
|
static |
Referenced by vlc_tls_ConnectWrite(), and vlc_tls_SocketAlloc().