diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-15 10:26:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-15 10:26:40 +0000 |
commit | db20ad5861aec8dd15d183539e8a71da6c2bdf1a (patch) | |
tree | 0136204da3c4bde01ec38d612e875a8621b4a8fd /include/connection.h | |
parent | bed0c38419b46ff23b36f1edb7e5aca6a86c7c8e (diff) |
Mesh linking stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@594 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/connection.h')
-rw-r--r-- | include/connection.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/connection.h b/include/connection.h index ac76654f9..710b90a2d 100644 --- a/include/connection.h +++ b/include/connection.h @@ -36,7 +36,10 @@ class ircd_connector : public classbase */ sockaddr_in addr; - /** File descriptor of the outbound connection + char host[MAXBUF]; + int port; + + /** File descriptor of the connection */ int fd; @@ -70,6 +73,9 @@ class ircd_connector : public classbase void SetDescriptor(int fd); int GetState(); void SetState(int state); + char* GetServerIP(); + int GetServerPort(); + bool SetHostAndPort(char* host, int port); }; @@ -113,11 +119,12 @@ class connection : public classbase connection(); bool CreateListener(char* host, int p); bool BeginLink(char* targethost, int port, char* password, char* servername); + bool MeshCookie(char* targethost, int port, long cookie, char* servername); void TerminateLink(char* targethost); bool SendPacket(char *message, const char* host); bool RecvPacket(std::deque<std::string> &messages, char* host); ircd_connector* FindHost(std::string host); - bool AddIncoming(int fd,char* targethost); + bool AddIncoming(int fd,char* targethost, int sourceport); long GenKey(); }; |