X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.h;h=13e499cf0c98268dc6754d36c5af30290318a6e8;hb=6927fcd82e211ff0561ae50e0b9acebedbbe789a;hp=f0334508c502779638cc478145b46ab6030a3af9;hpb=bccfd93a23c9d4dca68aa4cf4003500d9298a825;p=NeonServV5.git diff --git a/src/ClientSocket.h b/src/ClientSocket.h index f033450..13e499c 100644 --- a/src/ClientSocket.h +++ b/src/ClientSocket.h @@ -25,11 +25,14 @@ #define SOCKET_FLAG_PREFERRED 0x08 /* prefered bot to send datas to the IRC World (NOTICE's WHO's etc pp) */ #define SOCKET_FLAG_USE_QUEUE 0x10 #define SOCKET_FLAG_RECONNECT 0x20 +#define SOCKET_FLAG_SSL 0x40 +#define SOCKET_FLAG_HAVE_SSL 0x80 #define BUF_SIZ 512 struct UserNode; struct trigger_cache; +struct SSLConnection; struct ClientSocket { int sock; @@ -38,11 +41,16 @@ struct ClientSocket { unsigned int bufferpos; char *host; int port; + char *bind; char *pass; + char *nick; + char *ident; + char *realname; struct UserNode *user; unsigned long traffic_in; unsigned long traffic_out; time_t connection_time; + struct SSLConnection *sslconn; struct BotQueue *queue; @@ -58,9 +66,10 @@ struct ClientSocket { struct ClientSocket *next; }; -struct ClientSocket* create_socket(char *host, int port, char *pass, struct UserNode *user); +struct ClientSocket* create_socket(char *host, int port, char *bindto, char *pass, char *nick, char *ident, char *realname); int connect_socket(struct ClientSocket *client); int close_socket(struct ClientSocket *client); +int disconnect_socket(struct ClientSocket *client); int write_socket_force(struct ClientSocket *client, char* msg, int len); int write_socket(struct ClientSocket *client, char* msg, int len); void socket_loop(int timeout_seconds);