소스 검색

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

Andrej Studen 3 년 전
부모
커밋
8feb2a457e
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  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)