Changeset 37
- Timestamp:
- 02/06/08 20:39:26 (4 years ago)
- Files:
-
- 4 modified
-
cometd.py (modified) (1 diff)
-
tabled.py (modified) (3 diffs)
-
web/js/jquery.comet.js (modified) (1 diff)
-
web/js/poker-client.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cometd.py
r36 r37 304 304 305 305 self.stream.write( 306 self.ctypeProps["envelope"] % ( 306 307 simplejson.dumps(self.backlog), 308 ) 307 309 ) 308 310 -
tabled.py
r36 r37 14 14 from twisted.application import internet, service, strports 15 15 from twisted.web2 import http, resource, channel, stream, server, static, http_headers, responsecode 16 from path import path 16 17 import cometd 17 18 … … 186 187 """ 187 188 #cometd.verbose = False 189 class CometdRunner(resource.Resource): 190 # blah, hacky class. Wish we didn't need it 191 addSlash = True 192 child_web = static.File(path("web").abspath()) 193 child_cometd = cometd.cometd() 194 child_cometd.ClientType = WebClient 195 #child_cometd 196 def render(self, ctx): 197 return http.Response( stream="hi") 198 188 199 189 200 port = 8007#int(sys.argv[1]) … … 193 204 factory.protocol = PokerTableProtocol 194 205 195 comet = cometd.cometd() 196 comet.ClientType = WebClient 197 198 site = server.Site(comet) 206 207 site = server.Site(CometdRunner()) 199 208 application = service.Application("cometd") 200 209 -
web/js/jquery.comet.js
r36 r37 131 131 { 132 132 $.ajax({ 133 url: sUrl +'?jsonp=?',133 url: sUrl, 134 134 type: 'post', 135 135 beforeSend: function(oXhr) { oXhr.setRequestHeader('Connection', 'Keep-Alive'); }, -
web/js/poker-client.js
r36 r37 174 174 //$("form#connect_form").hide(); 175 175 // 176 $.comet.init(" http://localhost:8080");176 $.comet.init("/cometd"); 177 177 $.comet.subscribe("/poker", processStatus); 178 178
