peercast topology graph

来源:互联网 发布:枯之一叶 天下知秋 编辑:程序博客网 时间:2024/06/03 23:05
说明:   一、说明了程序的主要函数的启动顺序和过程。
       二、级别低的函数由级别高的函数调用,函数后面的说明不包括下一级别函数(因为在下一级别会说到...)。
       三、读者可以继续扩充文档
          比如10.1 被9调用
               10.1.1 被10.1函数调用函数1
               10.1.2 被10.1函数调用函数2
                 10.1.1.1 ........
1. peercastInst->init(); Ln281  simple.cpp //导入INI文件的设置
2. ServMgr::start();     Ln1627 servMgr.cpp //启动服务线程
3. ServMgr::serverProc(ThreadInfo *thread) Ln1904 serMgr.cpp //分配两个servent对象,设置防火墙状态
4. Servent::initServer(Host &h) Ln278 servent.cpp //用上级函数分配的servent初始化对象,初始化并且绑定socket
5. Servent::serverProc(ThreadInfo *thread) Ln2671 servent.cpp //设置servent为监听状态,判断是否根节点,判断连接端口数是否大于最大客户连接数,不是则创建连接,给自己设置GnuID
6. Servent::initIncoming(ClientSocket *s, unsigned int a) Ln317 servent.cpp //得到请求连接的servent的IP,开启threadinfo线程
7. Servent::incomingProc(ThreadInfo *thread) Ln2071 servent.cpp //处理threadinfo线程
8. Servent::handshakeIncoming() Ln358 servent.cpp //判断请求的协议种类:RTSP_PROTO1 | HTTP_PROTO1 | 还有一个没有判断?...
9. Servent::handshakeHTTP(HTTP &http, bool isHTTP) Ln84 servent.cpp //判断协议头,我跟到这里是GET/html/en/brocast.html/HTTP/1.1
10.
  10.1 Servent::handshakeCMD(char *cmd) Ln638 servent.cpp //判断HTTP.cmd。cmd的可能值为redirect | viewxml | clearlog | save | reg | edit_bcid | add_bcid | fetch | stopserv | hitlist | keywords= | clear | upgrade | connect | shutdown | stop | bump | keep | relay | add | logout | apply。其中如果是apply则继续判断curr,这里写不下了- -!
   10.1.1 Servent::handshakeAuth(HTTP &http,const char *args,bool local) Ln544 servent.cpp //远程连接发布点(root),判断用户名和密码
  10.2 Servent::handshakeRemoteFile(const char *dirName) Ln1582 servent.cpp
  10.3 Servent::handshakeLocalFile(const char *fn) Ln1542 servent.cpp
  10.4 Servent::handshakePLS(ChanInfo &info, bool doneHandshake) Ln440 servent.cpp
  10.5 Servent::triggerChannel(char *str, ChanInfo::PROTOCOL proto,bool relay) Ln392 servent.cpp
   10.5.1 Servent::processStream(bool doneHandshake,ChanInfo &chanInfo) Ln2117 servent.cpp
    10.5.1.1 Servent::handshakeStream(ChanInfo &chanInfo) Ln758 servent.cpp
    10.5.1.2 ChanMgr::findChannelByID(GnuID &id) Ln  servMgr.cpp //由GnuID返回一个channel对象
    10.5.1.3 Servent::sendRawChannel(bool sendHead, bool sendData) Ln2218 servent.cpp
    10.5.1.4 Servent::sendPCPChannel() Ln2561 servent.cpp
    10.5.1.5 Servent::sendPeercastChannel() Ln2507 servent.cpp
  10.6 Servent::handshakeICY(Channel::SRC_TYPE type, bool isHTTP) Ln1475 servent.cpp
  10.7 10.1.1