1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
17 #include <sys/types.h>
18 #include <sys/socket.h>
19 #include <netinet/in.h>
23 enum InspSocketState { I_DISCONNECTED, I_CONNECTING, I_CONNECTED, I_LISTENING, I_ERROR };
31 InspSocketState state;
38 InspSocket(std::string host, int port, bool listening, unsigned long maxtime);
39 virtual int OnConnected();
40 virtual int OnError();
41 virtual int OnDisconnect();
42 virtual int OnDataReady();
43 virtual int OnIncomingConnection();
44 void SetState(InspSocketState s);
46 virtual ~InspSocket();