Python socketserver.DatagramRequestHandler() Examples

The following are 17 code examples of socketserver.DatagramRequestHandler(). 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 Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 6 votes vote down vote up
def test_ThreadingUDPServer(self):
        self.run_server(socketserver.ThreadingUDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #2
Source File: test_socketserver.py    From android_universal with MIT License 5 votes vote down vote up
def test_ThreadingUnixDatagramServer(self):
        self.run_server(socketserver.ThreadingUnixDatagramServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #3
Source File: test_socketserver.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def test_UDPServer(self):
        self.run_server(socketserver.UDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #4
Source File: test_socketserver.py    From android_universal with MIT License 5 votes vote down vote up
def test_UnixDatagramServer(self):
        self.run_server(socketserver.UnixDatagramServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #5
Source File: test_socketserver.py    From android_universal with MIT License 5 votes vote down vote up
def test_ForkingUDPServer(self):
        with simple_subprocess(self):
            self.run_server(socketserver.ForkingUDPServer,
                            socketserver.DatagramRequestHandler,
                            self.dgram_examine) 
Example #6
Source File: test_socketserver.py    From android_universal with MIT License 5 votes vote down vote up
def test_ThreadingUDPServer(self):
        self.run_server(socketserver.ThreadingUDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #7
Source File: test_socketserver.py    From android_universal with MIT License 5 votes vote down vote up
def test_UDPServer(self):
        self.run_server(socketserver.UDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #8
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_ThreadingUnixDatagramServer(self):
        self.run_server(socketserver.ThreadingUnixDatagramServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
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_UnixDatagramServer(self):
        self.run_server(socketserver.UnixDatagramServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #10
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_ForkingUDPServer(self):
        with simple_subprocess(self):
            self.run_server(socketserver.ForkingUDPServer,
                            socketserver.DatagramRequestHandler,
                            self.dgram_examine) 
Example #11
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_UDPServer(self):
        self.run_server(socketserver.UDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #12
Source File: test_socketserver.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
def test_InterruptServerSelectCall(self):
        with self.mocked_select_module() as mock_select:
            pid = self.run_server(socketserver.TCPServer,
                                  socketserver.StreamRequestHandler,
                                  self.stream_examine)
            # Make sure select was called again:
            self.assertGreater(mock_select.called, 1)

    # Alas, on Linux (at least) recvfrom() doesn't return a meaningful
    # client address so this cannot work:

    # @requires_unix_sockets
    # def test_UnixDatagramServer(self):
    #     self.run_server(socketserver.UnixDatagramServer,
    #                     socketserver.DatagramRequestHandler,
    #                     self.dgram_examine)
    #
    # @requires_unix_sockets
    # def test_ThreadingUnixDatagramServer(self):
    #     self.run_server(socketserver.ThreadingUnixDatagramServer,
    #                     socketserver.DatagramRequestHandler,
    #                     self.dgram_examine)
    #
    # @requires_unix_sockets
    # @requires_forking
    # def test_ForkingUnixDatagramServer(self):
    #     self.run_server(socketserver.ForkingUnixDatagramServer,
    #                     socketserver.DatagramRequestHandler,
    #                     self.dgram_examine) 
Example #13
Source File: test_socketserver.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
def test_ForkingUDPServer(self):
        with simple_subprocess(self):
            self.run_server(socketserver.ForkingUDPServer,
                            socketserver.DatagramRequestHandler,
                            self.dgram_examine) 
Example #14
Source File: test_socketserver.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
def test_ThreadingUDPServer(self):
        self.run_server(socketserver.ThreadingUDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #15
Source File: test_socketserver.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
def test_UDPServer(self):
        self.run_server(socketserver.UDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine) 
Example #16
Source File: test_socketserver.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def test_ForkingUDPServer(self):
        with simple_subprocess(self):
            self.run_server(socketserver.ForkingUDPServer,
                            socketserver.DatagramRequestHandler,
                            self.dgram_examine)

    # Alas, on Linux (at least) recvfrom() doesn't return a meaningful
    # client address so this cannot work:

    # @requires_unix_sockets
    # def test_UnixDatagramServer(self):
    #     self.run_server(socketserver.UnixDatagramServer,
    #                     socketserver.DatagramRequestHandler,
    #                     self.dgram_examine)
    #
    # @requires_unix_sockets
    # def test_ThreadingUnixDatagramServer(self):
    #     self.run_server(socketserver.ThreadingUnixDatagramServer,
    #                     socketserver.DatagramRequestHandler,
    #                     self.dgram_examine)
    #
    # @requires_unix_sockets
    # @requires_forking
    # def test_ForkingUnixDatagramServer(self):
    #     self.run_server(socketserver.ForkingUnixDatagramServer,
    #                     socketserver.DatagramRequestHandler,
    #                     self.dgram_examine) 
Example #17
Source File: test_socketserver.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def test_ThreadingUDPServer(self):
        self.run_server(socketserver.ThreadingUDPServer,
                        socketserver.DatagramRequestHandler,
                        self.dgram_examine)