Python socketserver.UnixStreamServer() Examples

The following are 12 code examples of socketserver.UnixStreamServer(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module socketserver , or try the search function .
Example #1
Source File: test_socketserver.py    From ironpython3 with Apache License 2.0 6 votes vote down vote up
def test_UnixStreamServer(self):
        self.run_server(socketserver.UnixStreamServer,
                        socketserver.StreamRequestHandler,
                        self.stream_examine) 
Example #2
Source File: wsdd.py    From wsdd with MIT License 6 votes vote down vote up
def __init__(self, selector, listen_address, clients, known_devices):
        self.clients = clients

        if isinstance(listen_address, int) or listen_address.isnumeric():
            s_addr = ('localhost', int(listen_address))
            socketserver.TCPServer.allow_reuse_address = True
            s = socketserver.TCPServer(s_addr, ApiRequestHandler)
        else:
            s = socketserver.UnixStreamServer(
                listen_address, ApiRequestHandler)

        # quiet hacky
        s.wsd_clients = clients
        s.wsd_known_devices = known_devices

        selector.register(s.fileno(), selectors.EVENT_READ, s) 
Example #3
Source File: test_utils.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def server_bind(self):
            socketserver.UnixStreamServer.server_bind(self)
            self.server_name = '127.0.0.1'
            self.server_port = 80 
Example #4
Source File: test_socketserver.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def test_UnixStreamServer(self):
        self.run_server(socketserver.UnixStreamServer,
                        socketserver.StreamRequestHandler,
                        self.stream_examine) 
Example #5
Source File: _asyncio_test_utils.py    From txaio with MIT License 5 votes vote down vote up
def server_bind(self):
            socketserver.UnixStreamServer.server_bind(self)
            self.server_name = '127.0.0.1'
            self.server_port = 80 
Example #6
Source File: test_utils.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
def server_bind(self):
            socketserver.UnixStreamServer.server_bind(self)
            self.server_name = '127.0.0.1'
            self.server_port = 80 
Example #7
Source File: test_utils.py    From annotated-py-projects with MIT License 5 votes vote down vote up
def server_bind(self):
            socketserver.UnixStreamServer.server_bind(self)
            self.server_name = '127.0.0.1'
            self.server_port = 80 
Example #8
Source File: test_utils.py    From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 5 votes vote down vote up
def server_bind(self):
            socketserver.UnixStreamServer.server_bind(self)
            self.server_name = '127.0.0.1'
            self.server_port = 80 
Example #9
Source File: test_socketserver.py    From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 5 votes vote down vote up
def test_UnixStreamServer(self):
        self.run_server(socketserver.UnixStreamServer,
                        socketserver.StreamRequestHandler,
                        self.stream_examine) 
Example #10
Source File: test_socketserver.py    From android_universal with MIT License 5 votes vote down vote up
def test_UnixStreamServer(self):
        self.run_server(socketserver.UnixStreamServer,
                        socketserver.StreamRequestHandler,
                        self.stream_examine) 
Example #11
Source File: utils.py    From android_universal with MIT License 5 votes vote down vote up
def server_bind(self):
            socketserver.UnixStreamServer.server_bind(self)
            self.server_name = '127.0.0.1'
            self.server_port = 80 
Example #12
Source File: sshtunnel.py    From sshtunnel with MIT License 5 votes vote down vote up
def __init__(self, *args, **kwargs):
        self.logger = create_logger(kwargs.pop('logger', None))
        self.tunnel_ok = queue.Queue()
        UnixStreamServer.__init__(self, *args, **kwargs)