diff options
Diffstat (limited to 'docs/module-doc/connection_8h-source.html')
-rw-r--r-- | docs/module-doc/connection_8h-source.html | 116 |
1 files changed, 70 insertions, 46 deletions
diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index db7e86574..cfce346f5 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -8,52 +8,76 @@ <a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>connection.h</h1><a href="connection_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> 00002 <span class="comment"></span> -00003 <span class="comment">$Log$ -00003 <span class="comment">Revision 1.3 2003/01/27 00:28:57 brain -00003 <span class="comment">... -00003 <span class="comment"></span> -00004 <span class="comment">Revision 1.1 2003/01/26 23:52:59 brain</span> -00005 <span class="comment">Modified documentation for base classes</span> -00006 <span class="comment">Added base classes</span> -00007 <span class="comment"></span> -00008 <span class="comment">Revision 1.1 2003/01/26 20:15:00 brain</span> -00009 <span class="comment">Added server classes for linking</span> -00010 <span class="comment"></span> -00011 <span class="comment"></span> -00012 <span class="comment">*/</span> -00013 -00014 <span class="preprocessor">#include "inspircd_config.h"</span> -00015 <span class="preprocessor">#include "<a class="code" href="base_8h.html">base.h</a>"</span> -00016 <span class="preprocessor">#include <string></span> -00017 <span class="preprocessor">#include <map.h></span> -00018 -00019 <span class="preprocessor">#ifndef __CONNECTION_H__ </span> -00020 <span class="preprocessor"></span><span class="preprocessor">#define __CONNECTION_H__ </span> -00021 <span class="preprocessor"></span> -<a name="l00022"></a><a class="code" href="classconnection.html">00022</a> <span class="keyword">class </span><a class="code" href="classconnection.html">connection</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a> -00023 { -00024 <span class="keyword">public</span>: -<a name="l00025"></a><a class="code" href="classconnection.html#m0">00025</a> <span class="keywordtype">int</span> <a class="code" href="classconnection.html#m0">fd</a>; <span class="comment">// file descriptor</span> -<a name="l00026"></a><a class="code" href="classconnection.html#m1">00026</a> <span class="keywordtype">char</span> <a class="code" href="classconnection.html#m1">host</a>[256]; <span class="comment">// hostname</span> -<a name="l00027"></a><a class="code" href="classconnection.html#m2">00027</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m2">ip</a>; <span class="comment">// ipv4 address</span> -<a name="l00028"></a><a class="code" href="classconnection.html#m3">00028</a> <span class="keywordtype">char</span> <a class="code" href="classconnection.html#m3">inbuf</a>[MAXBUF]; <span class="comment">// recvQ</span> -<a name="l00029"></a><a class="code" href="classconnection.html#m4">00029</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m4">bytes_in</a>; -<a name="l00030"></a><a class="code" href="classconnection.html#m5">00030</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m5">bytes_out</a>; -<a name="l00031"></a><a class="code" href="classconnection.html#m6">00031</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m6">cmds_in</a>; -<a name="l00032"></a><a class="code" href="classconnection.html#m7">00032</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m7">cmds_out</a>; -<a name="l00033"></a><a class="code" href="classconnection.html#m8">00033</a> <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#m8">haspassed</a>; -<a name="l00034"></a><a class="code" href="classconnection.html#m9">00034</a> <span class="keywordtype">int</span> <a class="code" href="classconnection.html#m9">port</a>; -<a name="l00035"></a><a class="code" href="classconnection.html#m10">00035</a> <span class="keywordtype">int</span> <a class="code" href="classconnection.html#m10">registered</a>; -<a name="l00036"></a><a class="code" href="classconnection.html#m11">00036</a> time_t <a class="code" href="classconnection.html#m11">lastping</a>; -<a name="l00037"></a><a class="code" href="classconnection.html#m12">00037</a> time_t <a class="code" href="classconnection.html#m12">signon</a>; -<a name="l00038"></a><a class="code" href="classconnection.html#m13">00038</a> time_t <a class="code" href="classconnection.html#m13">idle_lastmsg</a>; -<a name="l00039"></a><a class="code" href="classconnection.html#m14">00039</a> time_t <a class="code" href="classconnection.html#m14">nping</a>; -00040 }; -00041 -00042 -00043 <span class="preprocessor">#endif</span> -00044 <span class="preprocessor"></span> -</pre></div><hr><address style="align: right;"><small>Generated on Mon Jan 27 00:23:10 2003 for InspIRCd by +00003 <span class="comment">*/</span> +00004 +00005 <span class="preprocessor">#include "inspircd_config.h"</span> +00006 <span class="preprocessor">#include "<a class="code" href="base_8h.html">base.h</a>"</span> +00007 <span class="preprocessor">#include <string></span> +00008 <span class="preprocessor">#include <map.h></span> +00009 <span class="preprocessor">#include <sys/socket.h></span> +00010 <span class="preprocessor">#include <sys/types.h></span> +00011 <span class="preprocessor">#include <netdb.h></span> +00012 <span class="preprocessor">#include <netinet/in.h></span> +00013 <span class="preprocessor">#include <unistd.h></span> +00014 <span class="preprocessor">#include <errno.h></span> +00015 <span class="preprocessor">#include <time.h></span> +00016 +00017 <span class="preprocessor">#ifndef __CONNECTION_H__</span> +00018 <span class="preprocessor"></span><span class="preprocessor">#define __CONNECTION_H__</span> +00019 <span class="preprocessor"></span> +<a name="l00020"></a><a class="code" href="connection_8h.html#a0">00020</a> <span class="preprocessor">#define PT_SYN_ONLY 0</span> +<a name="l00021"></a><a class="code" href="connection_8h.html#a1">00021</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_ACK_ONLY 1</span> +<a name="l00022"></a><a class="code" href="connection_8h.html#a2">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define PT_SYN_WITH_DATA 2</span> +00023 <span class="preprocessor"></span> +00024 +<a name="l00025"></a><a class="code" href="classpacket.html">00025</a> <span class="keyword">class </span><a class="code" href="classpacket.html">packet</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a> +00026 { +00027 <span class="keyword">public</span>: +<a name="l00028"></a><a class="code" href="classpacket.html#m0">00028</a> <span class="keywordtype">long</span> <a class="code" href="classpacket.html#m0">key</a>; +<a name="l00029"></a><a class="code" href="classpacket.html#m1">00029</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classpacket.html#m1">id</a>; +<a name="l00030"></a><a class="code" href="classpacket.html#m2">00030</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classpacket.html#m2">type</a>; +<a name="l00031"></a><a class="code" href="classpacket.html#m3">00031</a> <span class="keywordtype">char</span> <a class="code" href="classpacket.html#m3">data</a>[MAXBUF]; +00032 +00033 <a class="code" href="classpacket.html#a0">packet</a>(); +00034 <a class="code" href="classpacket.html#a1">~packet</a>(); +00035 }; +00036 +00037 +<a name="l00038"></a><a class="code" href="classconnection.html">00038</a> <span class="keyword">class </span><a class="code" href="classconnection.html">connection</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a> +00039 { +00040 <span class="keyword">public</span>: +<a name="l00041"></a><a class="code" href="classconnection.html#m0">00041</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m0">key</a>; +<a name="l00042"></a><a class="code" href="classconnection.html#m1">00042</a> <span class="keywordtype">int</span> <a class="code" href="classconnection.html#m1">fd</a>; <span class="comment">// file descriptor</span> +<a name="l00043"></a><a class="code" href="classconnection.html#m2">00043</a> <span class="keywordtype">char</span> <a class="code" href="classconnection.html#m2">host</a>[256]; <span class="comment">// hostname</span> +<a name="l00044"></a><a class="code" href="classconnection.html#m3">00044</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m3">ip</a>; <span class="comment">// ipv4 address</span> +<a name="l00045"></a><a class="code" href="classconnection.html#m4">00045</a> <span class="keywordtype">char</span> <a class="code" href="classconnection.html#m4">inbuf</a>[MAXBUF]; <span class="comment">// recvQ</span> +<a name="l00046"></a><a class="code" href="classconnection.html#m5">00046</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m5">bytes_in</a>; +<a name="l00047"></a><a class="code" href="classconnection.html#m6">00047</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m6">bytes_out</a>; +<a name="l00048"></a><a class="code" href="classconnection.html#m7">00048</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m7">cmds_in</a>; +<a name="l00049"></a><a class="code" href="classconnection.html#m8">00049</a> <span class="keywordtype">long</span> <a class="code" href="classconnection.html#m8">cmds_out</a>; +<a name="l00050"></a><a class="code" href="classconnection.html#m9">00050</a> <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#m9">haspassed</a>; +<a name="l00051"></a><a class="code" href="classconnection.html#m10">00051</a> <span class="keywordtype">int</span> <a class="code" href="classconnection.html#m10">port</a>; +<a name="l00052"></a><a class="code" href="classconnection.html#m11">00052</a> <span class="keywordtype">int</span> <a class="code" href="classconnection.html#m11">registered</a>; +<a name="l00053"></a><a class="code" href="classconnection.html#m12">00053</a> time_t <a class="code" href="classconnection.html#m12">lastping</a>; +<a name="l00054"></a><a class="code" href="classconnection.html#m13">00054</a> time_t <a class="code" href="classconnection.html#m13">signon</a>; +<a name="l00055"></a><a class="code" href="classconnection.html#m14">00055</a> time_t <a class="code" href="classconnection.html#m14">idle_lastmsg</a>; +<a name="l00056"></a><a class="code" href="classconnection.html#m15">00056</a> time_t <a class="code" href="classconnection.html#m15">nping</a>; +00057 +00058 <a class="code" href="classconnection.html#a0">connection</a>(); +00059 <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#a1">CreateListener</a>(<span class="keywordtype">char</span>* host, <span class="keywordtype">int</span> p); +00060 <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#a2">BeginLink</a>(<span class="keywordtype">char</span>* targethost, <span class="keywordtype">int</span> port, <span class="keywordtype">char</span>* password); +00061 <span class="keywordtype">void</span> <a class="code" href="classconnection.html#a3">TerminateLink</a>(<span class="keywordtype">char</span>* targethost); +00062 <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#a4">SendPacket</a>(<span class="keywordtype">char</span> *message, <span class="keywordtype">char</span>* host, <span class="keywordtype">int</span> port); +00063 <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#a5">RecvPacket</a>(<span class="keywordtype">char</span> *message, <span class="keywordtype">char</span>* host, <span class="keywordtype">int</span> &prt); +00064 <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#a6">SendSYN</a>(<span class="keywordtype">char</span>* host, <span class="keywordtype">int</span> port); +00065 <span class="keywordtype">bool</span> <a class="code" href="classconnection.html#a7">SendACK</a>(<span class="keywordtype">char</span>* host, <span class="keywordtype">int</span> port, <span class="keywordtype">int</span> reply_id); +00066 <span class="keywordtype">long</span> <a class="code" href="classconnection.html#a8">GenKey</a>(); +00067 }; +00068 +00069 +00070 <span class="preprocessor">#endif</span> +00071 <span class="preprocessor"></span> +</pre></div><hr><address style="align: right;"><small>Generated on Sun Feb 9 12:48:16 2003 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.3-rc2 </small></address> |