示例#1
0
文件: power_run.py 项目: yf8848/Note
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

from powerdht.app import App
from powerdht.handler import StreamHandler, FileHandler

if __name__ == '__main__':
    App.configure_options(host='0.0.0.0',
                          port=6881,
                          node_size=100000,
                          thread_num=8,
                          q_size=200,
                          log_level="warning",
                          log_file_prefix='dht.log')
    app = App.instance("MultiThread")
    app.add_handler(StreamHandler())
    app.add_handler(
        FileHandler(os.path.join(os.path.dirname(__file__), 'infohash.txt')))
    app.startd()
示例#2
0
文件: sim_run.py 项目: yf8848/Note
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

from powerdht.app import App
from powerdht.handler import StreamHandler, FileHandler

if __name__ == '__main__':
    App.configure_options(host='0.0.0.0',
                          port=6881,
                          node_size=100000,
                          log_file_prefix='dht.log')
    app = App.instance("SingleThread")
    app.add_handler(StreamHandler())
    app.add_handler(
        FileHandler(os.path.join(os.path.dirname(__file__), 'infohash.txt')))
    app.startd()
示例#3
0
文件: sim_run.py 项目: damnever/Note
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

from powerdht.app import App
from powerdht.handler import StreamHandler, FileHandler


if __name__ == '__main__':
    App.configure_options(
        host='0.0.0.0',
        port=6881,
        node_size=100000,
        log_file_prefix='dht.log')
    app = App.instance("SingleThread")
    app.add_handler(StreamHandler())
    app.add_handler(
        FileHandler(os.path.join(os.path.dirname(__file__), 'infohash.txt')))
    app.startd()
示例#4
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

from powerdht.app import App
from powerdht.handler import StreamHandler, FileHandler


if __name__ == '__main__':
    App.configure_options(
        host='0.0.0.0',
        port=6881,
        node_size=100000,
        thread_num=8,
        q_size=200,
        log_level="warning",
        log_file_prefix='dht.log')
    app = App.instance("MultiThread")
    app.add_handler(StreamHandler())
    app.add_handler(
        FileHandler(os.path.join(os.path.dirname(__file__), 'infohash.txt')))
    app.startd()