[Pkg-privacy-commits] [pyptlib] 19/136: Moved framework client and server into managed/external directories
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:25:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository pyptlib.
commit ee40cafd5de39ec940dee25e073c21b435da05b8
Author: Brandon Wiley <brandon at blanu.net>
Date: Sun Jun 24 18:37:50 2012 -0500
Moved framework client and server into managed/external directories
---
src/pyptlib/framework/client.py | 61 ----------------------------------------
src/pyptlib/framework/server.py | 62 -----------------------------------------
2 files changed, 123 deletions(-)
diff --git a/src/pyptlib/framework/client.py b/src/pyptlib/framework/client.py
deleted file mode 100755
index 14f814b..0000000
--- a/src/pyptlib/framework/client.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python -u
-
-import os
-import sys
-
-from struct import unpack
-from socket import inet_ntoa
-
-import monocle
-from monocle import _o, Return
-monocle.init('tornado')
-
-from monocle.stack import eventloop
-from monocle.stack.network import add_service, Service, Client, ConnectionLost
-from pyptlib.framework.loopback import FakeSocket
-
-from pyptlib.framework.socks import SocksHandler
-
-from pyptlib.config.config import EnvException
-from pyptlib.config.client import ClientConfig
-from pyptlib.framework.daemon import *
-
-from pyptlib.transports.dummy import DummyClient
-
-class ManagedClient(Daemon):
- def __init__(self):
- try:
- Daemon.__init__(self, ClientConfig(), SocksHandler())
- except EnvException:
- print('error 0')
- return
- except UnsupportedManagedTransportVersionException:
- print('error 1')
- return
- except NoSupportedTransportsException:
- print('error 2')
- return
-
- try:
- self.launchClient(self.supportedTransport, 8182)
- self.config.writeMethod(self.supportedTransport, 5, ('127.0.0.1', 8182), None, None)
- except TransportLaunchException as e:
- print('error 3')
- self.config.writeMethodError(self.supportedTransport, e.message)
-
- self.config.writeMethodEnd()
-
- self.run()
-
- def launchClient(self, name, port):
- if name!=self.supportedTransport:
- raise TransportLaunchException('Tried to launch unsupported transport %s' % (name))
-
- client=DummyClient()
- self.handler.setTransport(client)
- add_service(Service(self.handler, port=port))
-
-if __name__=='__main__':
- sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
- server=ManagedClient()
-
\ No newline at end of file
diff --git a/src/pyptlib/framework/server.py b/src/pyptlib/framework/server.py
deleted file mode 100755
index 08b2e09..0000000
--- a/src/pyptlib/framework/server.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python -u
-
-import os
-import sys
-
-from struct import unpack
-from socket import inet_ntoa
-
-import monocle
-from monocle import _o, Return
-monocle.init('tornado')
-
-from monocle.stack import eventloop
-from monocle.stack.network import add_service, Service, Client
-
-from pyptlib.framework.shared import pump
-
-from pyptlib.config.config import EnvException
-from pyptlib.config.server import ServerConfig, MethodOptions
-from pyptlib.framework.daemon import *
-
-from pyptlib.framework.proxy import ProxyHandler
-
-from pyptlib.transports.dummy import DummyServer
-
-class ManagedServer(Daemon):
- def __init__(self):
- try:
- Daemon.__init__(self, ServerConfig(), ProxyHandler())
- except EnvException:
- print('error 0')
- return
- except UnsupportedManagedTransportVersionException:
- print('error 1')
- return
- except NoSupportedTransportsException:
- print('error 2')
- return
-
- try:
- self.launchServer(self.supportedTransport, 8182)
- self.config.writeMethod(self.supportedTransport, ('127.0.0.1', 8182), MethodOptions())
- except TransportLaunchException as e:
- print('error 3')
- self.config.writeMethodError(self.supportedTransport, e.message)
-
- self.config.writeMethodEnd()
-
- self.run()
-
- def launchServer(self, name, port):
- if name!=self.supportedTransport:
- raise TransportLaunchException('Tried to launch unsupported transport %s' % (name))
-
- client=DummyServer()
- self.handler.setTransport(client)
- add_service(Service(self.handler, port=port))
-
-if __name__=='__main__':
- sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
- server=ManagedServer()
-
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/pyptlib.git
More information about the Pkg-privacy-commits
mailing list