Changeset 48 for remote_control
- Timestamp:
- 06/16/10 13:56:29 (12 years ago)
- Location:
- remote_control
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
remote_control/puzzlebox_brainstorms_client.py
r31 r48 9 9 # For more information please refer to http://www.gnu.org/copyleft/gpl.html 10 10 # 11 # Last Update: 2010.0 2.0311 # Last Update: 2010.06.16 12 12 # 13 13 ##################################################################### 14 14 15 15 import os, sys 16 import cPickle as pickle 16 #import cPickle as pickle 17 import simplejson as json 17 18 18 19 from twisted.internet import reactor, protocol, defer … … 84 85 def connectionMade(self): 85 86 86 data = pickle.dumps(self.factory.command) 87 #data = pickle.dumps(self.factory.command) 88 data = json.dumps(self.factory.command) 87 89 self.transport.write(data) 88 90 … … 118 120 119 121 try: 120 reply = pickle.loads(self.data_chunk) 122 #reply = pickle.loads(self.data_chunk) 123 reply = json.loads(self.data_chunk) 121 124 except Exception, e: 122 125 if self.DEBUG: … … 218 221 219 222 self.command_parameters = command_parameters 220 self.server_host = SERVER_HOST221 self.server_port = SERVER_PORT223 self.server_host = server_host 224 self.server_port = server_port 222 225 self.max_connection_attempts = MAX_CONNECTION_ATTEMPTS 223 226 -
remote_control/puzzlebox_brainstorms_configuration.ini
r45 r48 16 16 SERVER_PORT = 8194 17 17 18 THINKGEAR_SERVER_HOST = '127.0.0.1' 19 THINKGEAR_SERVER_PORT = 13854 20 18 21 19 22 ##################################################################### -
remote_control/puzzlebox_brainstorms_configuration.py
r45 r48 9 9 # For more information please refer to http://www.gnu.org/copyleft/gpl.html 10 10 # 11 # Last Update: 2010.06.1 011 # Last Update: 2010.06.16 12 12 # 13 13 ##################################################################### … … 61 61 SERVER_PORT = 8194 62 62 63 THINKGEAR_SERVER_HOST = '127.0.0.1' 64 THINKGEAR_SERVER_PORT = 13854 65 63 66 64 67 ##################################################################### … … 91 94 HEALTH_CHECK_CONNECTION_ATTEMPTS = 5 92 95 NO_REPLY_WAIT = 10 # how many seconds before considering a component dead 96 97 98 ##################################################################### 99 # ThinkGear Connect configuration 100 ##################################################################### 101 102 THINKGEAR_AUTHORIZATION_REQUEST = { \ 103 "appName": "Puzzlebox Brainstorms", \ 104 "appKey": "2e285d7bd5565c0ea73e7e265c73f0691d932408" 105 } 93 106 94 107 -
remote_control/puzzlebox_brainstorms_server.py
r43 r48 9 9 # For more information please refer to http://www.gnu.org/copyleft/gpl.html 10 10 # 11 # Last Update: 2010.06. 0111 # Last Update: 2010.06.16 12 12 # 13 13 ##################################################################### 14 14 15 15 import os, signal, sys, time 16 import cPickle as pickle 16 #import cPickle as pickle 17 import simplejson as json 17 18 18 19 from twisted.internet import reactor, protocol, defer … … 131 132 132 133 try: 133 self.command = pickle.loads(self.data_chunk) 134 #self.command = pickle.loads(self.data_chunk) 135 self.command = json.loads(self.data_chunk) 134 136 135 137 except Exception, e: … … 147 149 def send_response(self, response): 148 150 149 response = pickle.dumps(response) 151 #response = pickle.dumps(response) 152 response = json.dumps(response) 150 153 151 154 self.transport.write(response)
Note: See TracChangeset
for help on using the changeset viewer.