NeoMutt  2019-12-07-168-gc45f47
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 
39  char inbuf[1024];
40  int bufpos;
41 
42  int fd;
43  int available;
44 
45  void *sockdata;
46 
53  int (*conn_open) (struct Connection *conn);
62  int (*conn_read) (struct Connection *conn, char *buf, size_t count);
71  int (*conn_write)(struct Connection *conn, const char *buf, size_t count);
80  int (*conn_poll) (struct Connection *conn, time_t wait_secs);
87  int (*conn_close)(struct Connection *conn);
88 };
89 
90 #endif /* MUTT_CONN_CONNECTION_H */
struct ConnAccount account
Definition: connection.h:36
unsigned int ssf
security strength factor, in bits
Definition: connection.h:37
int(* conn_open)(struct Connection *conn)
Open a socket Connection.
Definition: connection.h:53
int(* conn_read)(struct Connection *conn, char *buf, size_t count)
Read from a socket Connection.
Definition: connection.h:62
void * sockdata
Definition: connection.h:45
An open network connection (socket)
Definition: connection.h:34
char inbuf[1024]
Definition: connection.h:39
int(* conn_poll)(struct Connection *conn, time_t wait_secs)
Check whether a socket read would block.
Definition: connection.h:80
int available
Definition: connection.h:43
int(* conn_close)(struct Connection *conn)
Close a socket Connection.
Definition: connection.h:87
int(* conn_write)(struct Connection *conn, const char *buf, size_t count)
Write to a socket Connection.
Definition: connection.h:71
Login details for a remote server.
Definition: connaccount.h:58
int bufpos
Definition: connection.h:40
Connection Credentials.