File: tcp_server.py

package info (click to toggle)
python-umodbus 1.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 456 kB
  • sloc: python: 1,944; makefile: 166; sh: 5
file content (15 lines) | stat: -rw-r--r-- 333 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
try:
    from socketserver import TCPServer
except ImportError:
    from SocketServer import TCPServer

from umodbus import conf
from umodbus.server.tcp import get_server, RequestHandler

from tests.system import route

conf.SIGNED_VALUES = True

app = get_server(TCPServer, ('localhost', 0), RequestHandler)

route.bind_routes(app)