diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-27 16:19:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-27 16:19:24 +0000 |
commit | 0dda9fb325a4d0053652f937ad06e44942357cc1 (patch) | |
tree | d62e6895ce65062d0b19a39d2da4a7c3d43ff7b0 /src/socket.cpp | |
parent | 6f4a168a8d127beb3075cbcd07aeb5592aa4bbf8 (diff) |
Added /CONNECT
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1968 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 67ff65c70..aa028b8a5 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -94,6 +94,8 @@ InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long ip = inet_ntoa(*ia); } + this->IP = ip; + timeout_end = time(NULL)+maxtime; timeout = false; if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) @@ -138,6 +140,11 @@ void InspSocket::Close() } } +std::string InspSocket::GetIP() +{ + return this->IP; +} + char* InspSocket::Read() { int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); |