source: src/test/java/geniusweb/examples/PythonDownloadProfile.py@ 22

Last change on this file since 22 was 22, checked in by bart, 4 years ago
  • party capabilities now include profile information. Existing parties may need small fix * plot layout shows accepts * VotingEvaluator use group power instead of group size * runsession you can now also select MOPAC-only parties
File size: 643 bytes
Line 
1import time
2
3import com.neovisionaries.ws.client.WebSocketAdapter as WebSocketAdapter
4import com.neovisionaries.ws.client.WebSocketFactory as WebSocketFactory
5
6class PythonDownloadProfile(WebSocketAdapter):
7
8 def __init__(self):
9
10 factory = WebSocketFactory()
11 factory.setConnectionTimeout(5000)
12 ws = factory.createSocket("ws://localhost:8080/profilesserver/websocket/get/jobs/jobs1")
13 ws.addListener(self)
14
15 ws.connect()
16 time.sleep(2) # just briefly wait for possible updates
17 ws.disconnect()
18
19 def onTextMessage(self, websocket, json):
20 print "received message: "+json
Note: See TracBrowser for help on using the repository browser.