NeoMutt  2021-02-05-666-ge300cd
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 
38 struct Connection
39 {
41  unsigned int ssf;
42  char inbuf[1024];
43  int bufpos;
44  int fd;
45  int available;
46  void *sockdata;
47 
69  int (*open)(struct Connection *conn);
70 
82  int (*read)(struct Connection *conn, char *buf, size_t count);
83 
95  int (*write)(struct Connection *conn, const char *buf, size_t count);
96 
108  int (*poll)(struct Connection *conn, time_t wait_secs);
109 
119  int (*close)(struct Connection *conn);
120 };
121 
122 #endif /* MUTT_CONN_CONNECTION_H */
struct ConnAccount account
Account details: username, password, etc.
Definition: connection.h:40
unsigned int ssf
Security strength factor, in bits (see below)
Definition: connection.h:41
int(* read)(struct Connection *conn, char *buf, size_t count)
Definition: connection.h:82
void * sockdata
Backend-specific socket data.
Definition: connection.h:46
int(* open)(struct Connection *conn)
Definition: connection.h:69
char inbuf[1024]
Buffer for incoming traffic.
Definition: connection.h:42
int(* close)(struct Connection *conn)
Definition: connection.h:119
int fd
Socket file descriptor.
Definition: connection.h:44
int available
Amount of data waiting to be read.
Definition: connection.h:45
Login details for a remote server.
Definition: connaccount.h:51
int(* poll)(struct Connection *conn, time_t wait_secs)
Definition: connection.h:108
int(* write)(struct Connection *conn, const char *buf, size_t count)
Definition: connection.h:95
int bufpos
Current position in the buffer.
Definition: connection.h:43
Connection Credentials.