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

📄 nntp.h

📁 chord 源码 http://pdos.csail.mit.edu/chord/
💻 H
字号:
#ifndef NNTP_H#define NNTP_Hstruct newsgroup;extern u_int64_t fedinbytes;typedef struct c_jmp_entry {  const char *cmd;  int len;  cbs fn;  c_jmp_entry (const char *_cmd, cbs _fn) : cmd (_cmd), fn (_fn) {    len = strlen (cmd);  };} c_jmp_entry_t;class nntp {  static u_int64_t nconn_;  static u_int64_t fedinposts_;  static u_int64_t fedinbytes_;  static u_int64_t dhashbytes_; // differs from above in \r\n, ., dupes, ...  static u_int64_t dhashposts_;  static u_int64_t ndeferrals_;    int s;  ptr<aios> aio;  vec<str> lines; // buffer of lines to be processed  ptr<newsgroup> cur_group;  cbv process_input;  bool posting;  ptr<bool> deleted;    void process_line (const str, int);  void command (void);  void add_cmd (const char *, cbs);    void cmd_hello (str);  void cmd_list (str);  void cmd_group (str);  void cmd_over (str);  void cmd_article (str);  void cmd_post (str);  void read_post (str, str, bool);  void cmd_quit (str);  void cmd_help (str);  void cmd_ihave (str);  void cmd_check (bool, str);  void cmd_takethis (bool, str);  void cmd_stats (str);  void cmd_article_cb (ptr<bool>, bool, chordID, dhash_stat, ptr<dhash_block>,		       vec<chordID>);  void read_post_cb (ptr<bool>, size_t l, ptr<dbrec>, vec<str>,		     dhash_stat, ptr<insert_info>);  void docontrol (str);  vec<c_jmp_entry_t> cmd_table;public:  nntp (int _s, const sockaddr_in &sin);  ~nntp ();  static u_int64_t fedinbytes () { return fedinbytes_; }  static u_int64_t fedinposts () { return fedinposts_; }  static u_int64_t nconn () { return nconn_; }  static u_int64_t dhashbytes () { return dhashbytes_; }  static u_int64_t dhashposts () { return dhashposts_; }  static u_int64_t deferred_articles () { return ndeferrals_; }};#endif /* NNTP_H */

⌨️ 快捷键说明

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