NeoMutt  2020-06-26-89-g172cd3
Teaching an old dog new tricks
DOXYGEN
connection.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_CONN_CONNECTION_H
25 #define MUTT_CONN_CONNECTION_H
26 
27 #include <stdio.h>
28 #include <time.h>
29 #include "connaccount.h"
30 
34 struct Connection
35 {
37  unsigned int ssf;
38  char inbuf[1024];
39  int bufpos;
40  int fd;
41  int available;
42  void *sockdata;
43 
62  int (*open)(struct Connection *conn);
63 
72  int (*read)(struct Connection *conn, char *buf, size_t count);
73 
82  int (*write)(struct Connection *conn, const char *buf, size_t count);
83 
92  int (*poll)(struct Connection *conn, time_t wait_secs);
93 
100  int (*close)(struct Connection *conn);
101 };
102 
103 #endif /* MUTT_CONN_CONNECTION_H */
struct ConnAccount account
Account details: username, password, etc.
Definition: connection.h:36
unsigned int ssf
Security strength factor, in bits (see below)
Definition: connection.h:37
int(* read)(struct Connection *conn, char *buf, size_t count)
Read from a socket Connection.
Definition: connection.h:72
void * sockdata
Backend-specific socket data.
Definition: connection.h:42
An open network connection (socket)
Definition: connection.h:34
int(* open)(struct Connection *conn)
Note about ssf: in actuality, NeoMutt uses this as a boolean to determine if the connection is "secur...
Definition: connection.h:62
char inbuf[1024]
Buffer for incoming traffic.
Definition: connection.h:38
int(* close)(struct Connection *conn)
Close a socket Connection.
Definition: connection.h:100
int fd
Socket file descriptor.
Definition: connection.h:40
int available
Amount of data waiting to be read.
Definition: connection.h:41
Login details for a remote server.
Definition: connaccount.h:51
int(* poll)(struct Connection *conn, time_t wait_secs)
Check whether a socket read would block.
Definition: connection.h:92
int(* write)(struct Connection *conn, const char *buf, size_t count)
Write to a socket Connection.
Definition: connection.h:82
int bufpos
Current position in the buffer.
Definition: connection.h:39
Connection Credentials.