Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cleaned up chat.py and setup.py version bump

  • Loading branch information...
commit de76c25bd4e56eb5ea6c284233a521f1505e98e1 1 parent 13f24f8
John Anderson sontek authored

Showing 3 changed files with 7 additions and 8 deletions. Show diff stats Hide diff stats

  1. +0 1  examples/chat.html
  2. +6 6 examples/chat.py
  3. +1 1  setup.py
1  examples/chat.html
@@ -58,7 +58,6 @@
58 58 $('#send-message').submit(function () {
59 59 message('me', $('#message').val());
60 60 socket.emit('user message', $('#message').val());
61   - socket.send("TESTING !@#")
62 61 clear();
63 62 $('#lines').get(0).scrollTop = 10000000;
64 63 return false;
12 examples/chat.py
@@ -7,17 +7,17 @@
7 7 class ChatNamespace(BaseNamespace, RoomsMixin, BroadcastMixin):
8 8
9 9 def on_nickname(self, nickname):
10   - self.environ['nicknames'].add(nikname)
  10 + self.environ['nicknames'].append(nickname)
11 11 self.socket.session = nickname
12 12 self.broadcast_event('anouncement', '%s has connected' % nickname)
13 13 self.broadcast_event('nicknames', self.environ['nicknames'])
14 14
15   - def on_join_room(self, room_name):
16   - self.join(room_name)
17   -
18   - def on_msg_to_room(self, room_name, msg):
  15 + def on_user_message(self, room_name, msg):
19 16 self.emit_to_room('msg_to_room', room_name, msg)
20 17
  18 + def recv_message(self, message):
  19 + print "PING!!!", message
  20 +
21 21
22 22 class Application(object):
23 23 def __init__(self):
@@ -25,7 +25,7 @@ def __init__(self):
25 25
26 26 def __call__(self, environ, start_response):
27 27 path = environ['PATH_INFO'].strip('/')
28   - environ['nicknames'] = set()
  28 + environ['nicknames'] = []
29 29
30 30 if not path:
31 31 start_response('200 OK', [('Content-Type', 'text/html')])
2  setup.py
@@ -2,7 +2,7 @@
2 2
3 3 setup(
4 4 name="gevent-socketio",
5   - version="0.2.4",
  5 + version="0.3",
6 6 description="SocketIO server based on the Gevent pywsgi server, a Python network library",
7 7 #long_description=open("README.rst").read(),
8 8 author="Jeffrey Gelens",

0 comments on commit de76c25

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