Skip to content
Browse files

cleaned up chat.py and setup.py version bump

  • Loading branch information...
1 parent 13f24f8 commit de76c25bd4e56eb5ea6c284233a521f1505e98e1 @sontek sontek committed Mar 14, 2012
Showing with 7 additions and 8 deletions.
  1. +0 −1 examples/chat.html
  2. +6 −6 examples/chat.py
  3. +1 −1 setup.py
View
1 examples/chat.html
@@ -58,7 +58,6 @@
$('#send-message').submit(function () {
message('me', $('#message').val());
socket.emit('user message', $('#message').val());
- socket.send("TESTING !@#")
clear();
$('#lines').get(0).scrollTop = 10000000;
return false;
View
12 examples/chat.py
@@ -7,25 +7,25 @@
class ChatNamespace(BaseNamespace, RoomsMixin, BroadcastMixin):
def on_nickname(self, nickname):
- self.environ['nicknames'].add(nikname)
+ self.environ['nicknames'].append(nickname)
self.socket.session = nickname
self.broadcast_event('anouncement', '%s has connected' % nickname)
self.broadcast_event('nicknames', self.environ['nicknames'])
- def on_join_room(self, room_name):
- self.join(room_name)
-
- def on_msg_to_room(self, room_name, msg):
+ def on_user_message(self, room_name, msg):
self.emit_to_room('msg_to_room', room_name, msg)
+ def recv_message(self, message):
+ print "PING!!!", message
+
class Application(object):
def __init__(self):
self.buffer = []
def __call__(self, environ, start_response):
path = environ['PATH_INFO'].strip('/')
- environ['nicknames'] = set()
+ environ['nicknames'] = []
if not path:
start_response('200 OK', [('Content-Type', 'text/html')])
View
2 setup.py
@@ -2,7 +2,7 @@
setup(
name="gevent-socketio",
- version="0.2.4",
+ version="0.3",
description="SocketIO server based on the Gevent pywsgi server, a Python network library",
#long_description=open("README.rst").read(),
author="Jeffrey Gelens",

0 comments on commit de76c25

Please sign in to comment.
Something went wrong with that request. Please try again.