summaryrefslogtreecommitdiff
path: root/voctogui/lib/connection.py
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-08-15 13:22:34 +0200
committerMaZderMind <git@mazdermind.de>2015-08-31 20:01:18 +0200
commit5c243f1cac5cc489f3bbb821ab5064d9edf7d449 (patch)
treef93aecc72a95a45ad6f936f562d5b3fdaf422877 /voctogui/lib/connection.py
parenta004948051e182edb3a7e40f1f7f2e14bebb0e0e (diff)
basic connection
Diffstat (limited to 'voctogui/lib/connection.py')
-rw-r--r--voctogui/lib/connection.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/voctogui/lib/connection.py b/voctogui/lib/connection.py
new file mode 100644
index 0000000..37851f0
--- /dev/null
+++ b/voctogui/lib/connection.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python3
+import logging
+import socket
+
+log = logging.getLogger('Connection')
+sock = None
+port = 9999
+
+def establish(host):
+ log.info('establishing Connection to %s', host)
+ sock = socket.create_connection( (host, port) )
+ log.debug('Connection successful \o/')
+
+def ask(command):
+ print("would send command talk to server now and read back the response")