X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.h;h=a5ba352067377e1323ab4fa252fef3fe51856dbb;hb=bb5692b9cbff069abbf9573c81e86c3cd2061ceb;hp=7ede0c325e79b46e9c3302ef50887c7d14f96a37;hpb=391260f64a1dfb35bf0a55e7044fe1b8d83f2561;p=NeonServV5.git diff --git a/src/ClientSocket.h b/src/ClientSocket.h index 7ede0c3..a5ba352 100644 --- a/src/ClientSocket.h +++ b/src/ClientSocket.h @@ -1,5 +1,5 @@ -/* ClientSocket.h - NeonServ v5.2 - * Copyright (C) 2011 Philipp Kreil (pk910) +/* ClientSocket.h - NeonServ v5.3 + * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +27,8 @@ #define SOCKET_FLAG_RECONNECT 0x20 #define SOCKET_FLAG_SSL 0x40 #define SOCKET_FLAG_HAVE_SSL 0x80 +#define SOCKET_FLAG_QUITTED 0x100 +#define SOCKET_FLAG_FAST_JUMP 0x200 #define BUF_SIZ 512 @@ -36,7 +38,7 @@ struct SSLConnection; struct ClientSocket { int sock; - unsigned char flags; + unsigned int flags; char buffer[BUF_SIZ*2]; //we need to store up to 2 full commands at once unsigned int bufferpos; char *host; @@ -69,6 +71,7 @@ struct ClientSocket { 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);