Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(28)  |  Call(18)  |  Derive(0)  |  Import(10)

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/network/net.py   pyogp.lib.base(Download)
from logging import getLogger
 
from pyogp.lib.base.message.circuit import Host
 
logger = getLogger('net.net')
    def __init__(self):
        self.sender = Host((None, None))
 
    def get_sender(self):
        return self.sender

src/p/y/pyogp.apps-0.1dev/pyogp/apps/proxy/lib/udpproxy.py   pyogp.apps(Download)
 
# pyogp
from pyogp.lib.base.message.circuit import Host
from pyogp.lib.base.message.udpdispatcher import UDPDispatcher
from pyogp.lib.base.network.net import NetUDPClient
        self.settings.ENABLE_DEFERRED_PACKET_PARSING = False 
 
        self.target_host = Host((sim_ip, sim_port))
        self.local_host = None
        self.viewer_address = None
        self.hostname = self.proxy_socket.getsockname()[0]
 
        self.local_host = Host((self.hostname, viewer_facing_port)) # populate this convenience reference
 
        logger.info("Initialized the UDPProxy for %s" % (self.target_host))

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/region.py   pyogp.lib.client(Download)
from pyogp.lib.base.message.message_handler import MessageHandler
from pyogp.lib.base.message_manager import MessageManager
from pyogp.lib.base.message.circuit import Host
 
# utilities
 
 
        self.message_manager = MessageManager(Host((self.sim_ip, self.sim_port)),
                                              self.message_handler,
                                              self.capabilities,  self.settings)

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/message/tests/test_circuits.py   pyogp.lib.base(Download)
 
#local libraries
from pyogp.lib.base.message.circuit import CircuitManager, Circuit, Host
from pyogp.lib.base.message.message import Message, Block
from pyogp.lib.base.message.message import Message
    def test(self):
        host = Host((0x00000001, 80))
        assert host.is_ok() == True, "Good host thinks it is bad"
 
    def test_fail(self):
        host = Host((None, None))
    def setUp(self):
        self.host = Host((0x00000001, 80))
 
    def test(self):
        circuit = Circuit(self.host, 1)
    def setUp(self):
        self.host = Host((0x00000001, 80))
 
    def test_(self):
        manager = CircuitManager()

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/message/tests/test_udpconnection.py   pyogp.lib.base(Download)
from pyogp.lib.base.tests.mockup_net import MockupUDPServer, MockupUDPClient
from pyogp.lib.base.message.message import Message, Block
from pyogp.lib.base.message.circuit import Host
from pyogp.lib.base.message.udpdispatcher import UDPDispatcher
 
 
        self.udp_connection = UDPDispatcher(MockupUDPClient(), settings = self.settings)
        self.host = Host( (MockupUDPServer(), 80) )
 
    def test_find_circuit(self):
        host  = Host((MockupUDPServer(), 80))
        host2 = Host((MockupUDPServer(), 80))
    def test_send_reliable(self):
        msg = Message('PacketAck',
                      Block('Packets', ID=0x00000003)
                      )
        host = Host((MockupUDPServer(), 80))

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/tests/test_event_queue.py   pyogp.lib.client(Download)
from pyogp.lib.base.exc import *
from pyogp.lib.base.caps import Capability
from pyogp.lib.base.message.circuit import Host
 
# pyogp tests
    def setUp(self):
 
        self.eq = EventQueueClient(host = Host(('127.0.0.1', '9000')))
 
    def tearDown(self):

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/tests/mockup_net.py   pyogp.lib.client(Download)
import random
 
from pyogp.lib.base.message.circuit import Host
 
class MockupUDPServer(object):
    def send_message(self, client, send_message):
        #print 'SERVER send'
        client.rec = send_message
        client.sender = Host((self, self.port))
 

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/tests/test_message_manager.py   pyogp.lib.base(Download)
from pyogp.lib.base.message.message import Message, Block
from pyogp.lib.base.tests.mockup_net import MockupUDPServer, MockupUDPClient
from pyogp.lib.base.message.circuit import Host
from pyogp.lib.base.message.udpdispatcher import UDPDispatcher
 
    def setUp(self):
        self.host = Host((MockupUDPServer(), 80))
        self.message_manager = MessageManager(self.host,
                                              capabilities={'EventQueueGet' : Capability('EventQueueGet', 'http://127.0.0.1')})
 

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/tests/mockup_net.py   pyogp.lib.base(Download)
import random
 
from pyogp.lib.base.message.circuit import Host
 
class MockupUDPServer(object):
    def send_message(self, client, send_message):
        #print 'SERVER send'
        client.rec = send_message
        client.sender = Host((self, self.port))
 

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/network/tests/mockup_net.py   pyogp.lib.base(Download)
import random
 
from pyogp.lib.base.message.circuit import Host
 
class MockupUDPServer(object):
    def send_message(self, client, send_message):
        #print 'SERVER send'
        client.rec = send_message
        client.sender = Host((self, self.port))