diff options
author | MaZderMind <github@mazdermind.de> | 2016-01-27 12:25:53 +0100 |
---|---|---|
committer | MaZderMind <git@mazdermind.de> | 2016-02-02 16:05:56 +0100 |
commit | aa2e12b92df3400e6f9cb89afc16eb968b0c2491 (patch) | |
tree | ed05ec86ce2d2e85a708ec1514341122f8069d1f /voctogui/lib/connection.py | |
parent | 5e301fd1a88acf698f1918ddf8ea5981d12ac811 (diff) |
use the server-net-clock in the gui
Diffstat (limited to 'voctogui/lib/connection.py')
-rw-r--r-- | voctogui/lib/connection.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/voctogui/lib/connection.py b/voctogui/lib/connection.py index 6a9c025..6f8245f 100644 --- a/voctogui/lib/connection.py +++ b/voctogui/lib/connection.py @@ -7,17 +7,21 @@ from gi.repository import Gtk, GObject log = logging.getLogger('Connection') conn = None +ip = None port = 9999 command_queue = Queue() signal_handlers = {} def establish(host): - global conn, port, log + global conn, port, log, ip log.info('establishing Connection to %s', host) conn = socket.create_connection( (host, port) ) log.debug('Connection successful \o/') + ip = conn.getpeername()[0] + log.debug('Remote-IP is %s', ip) + def fetchServerConfig(): global conn, log |