Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/g/t/gtwisted-0.1.7alpha/gtwisted/core/protocols.py   gtwisted(Download)
@author:  lan (www.9miao.com)
'''
from gtwisted.core.base import Transport
from gevent import Greenlet
import gevent
    def __call__(self,socket,address):
        """每当有客户端连接产生是会被调用
        """
        t = Transport(socket,address,self.sessionno)
        self.buildProtocol(t)
        address = connector.getHost()
        client = create_connection(address)
        t = Transport(client,address)
        self.buildProtocol(t)
        self._protocol = self.protocol(t,self)