Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: sync/tools/testserver/xmppserver.py

Issue 11971025: [sync] Divorce python sync test server chromiumsync.py from testserver.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/tools/testserver/sync_testserver.py ('k') | sync/tools/testserver/xmppserver_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """A bare-bones and non-compliant XMPP server. 5 """A bare-bones and non-compliant XMPP server.
6 6
7 Just enough of the protocol is implemented to get it to work with 7 Just enough of the protocol is implemented to get it to work with
8 Chrome's sync notification system. 8 Chrome's sync notification system.
9 """ 9 """
10 10
11 import asynchat 11 import asynchat
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 self._connections.discard(xmpp_connection) 585 self._connections.discard(xmpp_connection)
586 self._handshake_done_connections.discard(xmpp_connection) 586 self._handshake_done_connections.discard(xmpp_connection)
587 587
588 def ForwardNotification(self, unused_xmpp_connection, notification_stanza): 588 def ForwardNotification(self, unused_xmpp_connection, notification_stanza):
589 if self._notifications_enabled: 589 if self._notifications_enabled:
590 for connection in self._handshake_done_connections: 590 for connection in self._handshake_done_connections:
591 print 'Sending notification to %s' % connection 591 print 'Sending notification to %s' % connection
592 connection.ForwardNotification(notification_stanza) 592 connection.ForwardNotification(notification_stanza)
593 else: 593 else:
594 print 'Notifications disabled; dropping notification' 594 print 'Notifications disabled; dropping notification'
OLDNEW
« no previous file with comments | « sync/tools/testserver/sync_testserver.py ('k') | sync/tools/testserver/xmppserver_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698