- public:
- InspIRCd* Instance;
-
- std::deque<std::string> outbuffer;
-
- /**
- * The hostname connected to
- */
- char host[MAXBUF];
-
- /**
- * The port connected to, or the port
- * this socket is listening on
- */
- int port;
-
- /**
- * The state for this socket, either
- * listening, connecting, connected
- * or error.
- */
- InspSocketState state;
-
- /**
- * The host being connected to,
- * in sockaddr form
- */
- insp_sockaddr addr;
-
- /**
- * The host being connected to,
- * in in_addr form
- */
- insp_inaddr addy;
-
- /**
- * When this time is reached,
- * the socket times out if it is
- * in the CONNECTING state
- */
- time_t timeout_end;
-
- /**
- * This value is true if the
- * socket has timed out.
- */
- bool timeout;
-
- /**
- * Socket input buffer, used by read(). The class which
- * extends InspSocket is expected to implement an extendable
- * buffer which can grow much larger than 64k,
- * this buffer is just designed to be temporary storage.
- * space.
- */
- char ibuf[65535];
-
- /**
- * The IP address being connected
- * to stored in string form for
- * easy retrieval by accessors.
- */
- char IP[MAXBUF];
-
- /**
- * Client sockaddr structure used
- * by accept()
- */
- insp_sockaddr client;
-
- /**
- * Server sockaddr structure used
- * by accept()
- */
- insp_sockaddr server;
-
- /**
- * Used by accept() to indicate the
- * sizes of the sockaddr_in structures
- */
- socklen_t length;
-
- /** Flushes the write buffer
- */
- bool FlushWriteBuffer();
-
- /** Set the queue sizes
- * This private method sets the operating system queue
- * sizes for this socket to 65535 so that it can queue
- * more information without application-level queueing
- * which was required in older software.
- */
- void SetQueues(int nfd);
-
- /** When the socket has been marked as closing, this flag
- * will be set to true, then the next time the socket is
- * examined, the socket is deleted and closed.