]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/connection.h
Commented new functions
[user/henk/code/inspircd.git] / include / connection.h
index e146c73bf5538bb18ad343d80c1174e50c55fd26..614a3146d7628bb69775d114ca55e57589c43b6a 100644 (file)
@@ -18,8 +18,8 @@
 #include "base.h"
 #include <string>
 #include <map>
-#include <sys/socket.h>
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <unistd.h>
@@ -27,6 +27,7 @@
 #include <time.h>
 #include <vector>
 #include <deque>
+#include <sstream>
 
 #ifndef __CONNECTION_H__
 #define __CONNECTION_H__
@@ -78,7 +79,13 @@ class ircd_connector : public Extensible
         */
        bool SetHostAddress(char* host, int port);
 
+
  public:
+
+        /** IRCD Buffer for input characters, holds one line
+         */
+        std::string ircdbuffer;
+
  
        /** When MakeOutboundConnection is called, these public members are
         * filled with the details passed to the function, for future
@@ -101,7 +108,7 @@ class ircd_connector : public Extensible
 
        /** Create an outbound connection to a listening socket
         */ 
-       bool MakeOutboundConnection(char* host, int port);
+       bool MakeOutboundConnection(char* newhost, int newport);
        
        /** Return the servername on this established connection
         */
@@ -152,22 +159,20 @@ class ircd_connector : public Extensible
        
        /** Set both the host and the port in one operation for this connection
         */
-       bool SetHostAndPort(char* host, int port);
+       bool SetHostAndPort(char* newhost, int newport);
        
        /** Close the connection by calling close() on its file descriptor
         * This function call updates no other data.
         */
        void CloseConnection();
-};
-
 
-/** Class packet is deprecated.
- * This declaration is preserved here to maintain documentation only.
- */
-class packet : public classbase
-{
+       void AddBuffer(std::string a);
+       bool BufferIsComplete();
+       void ClearBuffer();
+       std::string GetBuffer();
 };
 
+
 /** Please note: classes serverrec and userrec both inherit from class connection.
  */
 class connection : public Extensible
@@ -266,7 +271,7 @@ class connection : public Extensible
        
        /** Begin an outbound mesh link to another ircd on a network you are already an authenticated member of
         */
-       bool MeshCookie(char* targethost, int port, long cookie, char* servername);
+       bool MeshCookie(char* targethost, int port, unsigned long cookie, char* servername);
        
        /** Terminate a link to 'targethost' by calling the ircd_connector::CloseConnection method.
         */