From: <blu...@us...> - 2009-12-15 21:01:48
|
Revision: 319 http://virtplayground.svn.sourceforge.net/virtplayground/?rev=319&view=rev Author: bluewolf_ Date: 2009-12-15 21:01:38 +0000 (Tue, 15 Dec 2009) Log Message: ----------- Removed files that weren't part of the project and where not updated anyway Removed Paths: ------------- trunk/client/VP.py trunk/client/callback.py trunk/server/VPS.py trunk/server/callback.py Deleted: trunk/client/VP.py =================================================================== --- trunk/client/VP.py 2009-12-15 20:57:44 UTC (rev 318) +++ trunk/client/VP.py 2009-12-15 21:01:38 UTC (rev 319) @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -## This file is part of Virtual Playground -## Copyright (c) 2009 Jos Ratsma + Koen Koning - -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -import time -import core -from callback import Callback - -def main(): - client = core.Client(Callback) - client.connect('localhost', 5162) - - while 1: - #Pygame event loop should go here later. - try: - time.sleep(5000) - except KeyboardInterrupt: - print - exit() - -if __name__ == '__main__': main() - Deleted: trunk/client/callback.py =================================================================== --- trunk/client/callback.py 2009-12-15 20:57:44 UTC (rev 318) +++ trunk/client/callback.py 2009-12-15 21:01:38 UTC (rev 319) @@ -1,35 +0,0 @@ -## This file is part of Virtual Playground -## Copyright (c) 2009 Jos Ratsma + Koen Koning - -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -import core - -class Callback(core.Callback): - def connected(self, con): - print 'Connected!' - self.con = con - con.send('HI') - - def disconnected(self): - print 'CONNECTION DEAD' - #return True #reconnect - - def data_received(self, data): - print '<', repr(data) - - def data_send(self, data): - print '>', repr(data) - Deleted: trunk/server/VPS.py =================================================================== --- trunk/server/VPS.py 2009-12-15 20:57:44 UTC (rev 318) +++ trunk/server/VPS.py 2009-12-15 21:01:38 UTC (rev 319) @@ -1,40 +0,0 @@ -#!/usr/bin/env python - -## This file is part of Virtual Playground -## Copyright (c) 2009 Jos Ratsma + Koen Koning - -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -import time -import core -from callback import Callback - -def main(): - conf = {'host':'', - 'port':5162, - 'max_connections':0} - - server = core.Server(conf, Callback) - server.start_server() - - while 1: - try: - time.sleep(5000) - except KeyboardInterrupt: - print - exit() - -if __name__ == '__main__': main() - Deleted: trunk/server/callback.py =================================================================== --- trunk/server/callback.py 2009-12-15 20:57:44 UTC (rev 318) +++ trunk/server/callback.py 2009-12-15 21:01:38 UTC (rev 319) @@ -1,49 +0,0 @@ -## This file is part of Virtual Playground -## Copyright (c) 2009 Jos Ratsma + Koen Koning - -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -import core - -class Callback(core.Callback): - def server_online(self, clients): - print 'Server is online! :-)' - self.clients = clients - - def connection_opened(self, uid, client, host, port): - print 'New connection:', uid - - def connection_close(self, uid): - print 'Connection dead:', uid - - def connection_limit_exceeded(self, ip, current_connections, - max_connections): - print 'Connection limit exceeded: used %s/%s slots, auto '\ - 'accepted request from %s.' % (current_connections, - max_connections, ip) - return True - - def data_send(self, uid, data): - print '>', repr(data) - - def data_received(self, uid, data): - print '<', repr(data) - - head = data.keys()[0] - body = data[head] - - if head == 'HI': - self.clients[uid].send('LO') - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |