svghmi/svghmi_server.py
branchsvghmi
changeset 3200 75cb73b4a606
parent 2993 b76f303ffce6
child 3268 d22782b9591f
equal deleted inserted replaced
3199:1582753e409b 3200:75cb73b4a606
   171     global svghmi_listener, svghmi_root, svghmi_send_thread
   171     global svghmi_listener, svghmi_root, svghmi_send_thread
   172 
   172 
   173     svghmi_root = Resource()
   173     svghmi_root = Resource()
   174     svghmi_root.putChild("ws", WebSocketResource(HMIWebSocketServerFactory()))
   174     svghmi_root.putChild("ws", WebSocketResource(HMIWebSocketServerFactory()))
   175 
   175 
   176     svghmi_listener = reactor.listenTCP(8008, Site(svghmi_root))
   176     svghmi_listener = reactor.listenTCP(8008, Site(svghmi_root), interface='localhost')
   177 
   177 
   178     # start a thread that call the C part of SVGHMI
   178     # start a thread that call the C part of SVGHMI
   179     svghmi_send_thread = Thread(target=SendThreadProc, name="SVGHMI Send")
   179     svghmi_send_thread = Thread(target=SendThreadProc, name="SVGHMI Send")
   180     svghmi_send_thread.start()
   180     svghmi_send_thread.start()
   181 
   181