⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 repsock_8h-source.html

📁 FastDb是高效的内存数据库系统
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>FastDB: repsock.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.5 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div><h1>repsock.h</h1><div class="fragment"><pre>00001 <span class="comment">//-&lt; REPSOCK.H &gt;-----------------------------------------------------*--------*</span>00002 <span class="comment">// FastDB                    Version 1.0         (c) 1999  GARRET    *     ?  *</span>00003 <span class="comment">// (Main Memory Database Management System)                          *   /\|  *</span>00004 <span class="comment">//                                                                   *  /  \  *</span>00005 <span class="comment">//                          Created:      6-May-2003  K.A. Knizhnik  * / [] \ *</span>00006 <span class="comment">//                          Last update:  6-Apr-2003  K.A. Knizhnik  * GARRET *</span>00007 <span class="comment">//-------------------------------------------------------------------*--------*</span>00008 <span class="comment">// Replication socket</span>00009 <span class="comment">//-------------------------------------------------------------------*--------*</span>00010 00011 <span class="preprocessor">#ifndef __REPSOCK_H__</span>00012 <span class="preprocessor"></span><span class="preprocessor">#define __REPSOCK_H__</span>00013 <span class="preprocessor"></span>00014 <span class="preprocessor">#include "sockio.h"</span>00015 00016 <span class="comment">//</span>00017 <span class="comment">// Abstract socket interface</span>00018 <span class="comment">//</span>00019 <span class="keyword">class </span>FASTDB_DLL_ENTRY replication_socket_t : <span class="keyword">public</span> socket_t {00020   <span class="keyword">public</span>:00021     <span class="keyword">virtual</span> <span class="keywordtype">int</span>       read(<span class="keywordtype">void</span>* buf, size_t min_size, size_t max_size, time_t timeout);00022     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>      write(<span class="keywordtype">void</span> <span class="keyword">const</span>* buf, size_t size);00023 00024     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>      is_ok();00025     <span class="keyword">virtual</span> <span class="keywordtype">void</span>      get_error_text(<span class="keywordtype">char</span>* buf, size_t buf_size);00026 00027     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>      shutdown();00028 00029     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>      close();00030 00031     <span class="keyword">virtual</span> <span class="keywordtype">void</span>      handleError(<span class="keywordtype">int</span> socket, <span class="keyword">const</span> <span class="keywordtype">char</span>* operation, <span class="keyword">const</span> <span class="keywordtype">char</span>* error);00032 00033     <span class="keyword">static</span> replication_socket_t*  connect(<span class="keywordtype">char</span> <span class="keyword">const</span>* addresses[],00034                                           <span class="keywordtype">int</span> n_addresses, 00035                                           <span class="keywordtype">int</span> max_attempts = DEFAULT_CONNECT_MAX_ATTEMPTS,00036                                           time_t timeout = DEFAULT_RECONNECT_TIMEOUT);00037 00038     <span class="comment">// </span>00039     <span class="comment">// Not implemented for replication socket</span>00040     <span class="comment">//</span>00041     <span class="keyword">virtual</span> socket_t* accept();00042     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>      cancel_accept();00043     <span class="keyword">virtual</span> <span class="keywordtype">char</span>*     get_peer_name();00044     <span class="keyword">virtual</span> <span class="keywordtype">int</span>       get_handle();00045 00046     <span class="keyword">enum</span> { 00047         MaxSockets = 800048     };00049 00050 00051     ~replication_socket_t();00052 00053   <span class="keyword">protected</span>:00054     replication_socket_t(<span class="keywordtype">char</span> <span class="keyword">const</span>* addresses[], <span class="keywordtype">int</span> n_adresses, <span class="keywordtype">int</span> max_attempts, time_t timeout);00055 00056     socket_t**   sockets;00057     <span class="keywordtype">int</span>          n_sockets;00058     <span class="keywordtype">bool</span>         succeed;00059 };00060 00061 <span class="preprocessor">#endif</span>00062 <span class="preprocessor"></span>00063 00064 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Feb 12 13:04:48 2004 for FastDB by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.5 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -