Parcourir la source

Merge branch 'master' of ssh://git0.fmf.uni-lj.si:2222/studen/websocket

Andrej Studen il y a 3 ans
Parent
commit
8feb2a457e
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      send.py

+ 5 - 2
send.py

@@ -3,8 +3,11 @@ import websockets
 import sys
 
 async def hello(message):
-        uri = "ws://193.2.68.227:8765"
-        async with websockets.connect(uri) as websocket:
+        server="193.2.68.227"
+        server="vangogh.fmf.uni-lj.si"
+        uri = "ws://{}:8765".format(server)
+        origin="merlin"
+        async with websockets.connect(uri,origin=origin) as websocket:
             print('Sending {}'.format(message))
 
             await websocket.send(message)