summaryrefslogtreecommitdiff
path: root/voctogui/lib/connection.py
blob: 37851f0f96719419a2cc3d8ea964492618bf69f2 (plain)
  1. #!/usr/bin/python3
  2. import logging
  3. import socket
  4. log = logging.getLogger('Connection')
  5. sock = None
  6. port = 9999
  7. def establish(host):
  8. log.info('establishing Connection to %s', host)
  9. sock = socket.create_connection( (host, port) )
  10. log.debug('Connection successful \o/')
  11. def ask(command):
  12. print("would send command talk to server now and read back the response")