NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
socket.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_CONN_SOCKET_H
25 #define MUTT_CONN_SOCKET_H
26 
27 #include <time.h>
28 
29 struct Connection;
30 
35 {
39 };
40 
41 int mutt_socket_close (struct Connection *conn);
42 void mutt_socket_empty (struct Connection *conn);
43 struct Connection *mutt_socket_new (enum ConnectionType type);
44 int mutt_socket_open (struct Connection *conn);
45 int mutt_socket_poll (struct Connection *conn, time_t wait_secs);
46 int mutt_socket_read (struct Connection *conn, char *buf, size_t len);
47 int mutt_socket_readchar(struct Connection *conn, char *c);
48 int mutt_socket_readln_d(char *buf, size_t buflen, struct Connection *conn, int dbg);
49 int mutt_socket_write (struct Connection *conn, const char *buf, size_t len);
50 int mutt_socket_write_d (struct Connection *conn, const char *buf, int len, int dbg);
51 
52 #endif /* MUTT_CONN_SOCKET_H */
Tunnelled connection.
Definition: socket.h:37
int mutt_socket_read(struct Connection *conn, char *buf, size_t len)
read from a Connection
Definition: socket.c:125
int mutt_socket_close(struct Connection *conn)
Close a socket.
Definition: socket.c:97
int mutt_socket_readchar(struct Connection *conn, char *c)
simple read buffering to speed things up
Definition: socket.c:210
void mutt_socket_empty(struct Connection *conn)
Clear out any queued data.
Definition: socket.c:313
int mutt_socket_write(struct Connection *conn, const char *buf, size_t len)
write to a Connection
Definition: socket.c:138
int mutt_socket_poll(struct Connection *conn, time_t wait_secs)
Checks whether reads would block.
Definition: socket.c:192
int mutt_socket_open(struct Connection *conn)
Simple wrapper.
Definition: socket.c:76
SSL/TLS-encrypted connection.
Definition: socket.h:38
Simple TCP socket connection.
Definition: socket.h:36
int mutt_socket_write_d(struct Connection *conn, const char *buf, int len, int dbg)
Write data to a socket.
Definition: socket.c:152
struct Connection * mutt_socket_new(enum ConnectionType type)
allocate and initialise a new connection
Definition: socket.c:280
ConnectionType
Type of connection.
Definition: socket.h:34
int mutt_socket_readln_d(char *buf, size_t buflen, struct Connection *conn, int dbg)
Read a line from a socket.
Definition: socket.c:246