def appConnect(self, conn, params): ApplicationAdapter.appConnect(self, conn, params) print 'Python appConnect:', conn, params self.measureBandwidth(conn) if isinstance(conn, IStreamCapableConnection): print 'Python setting bandwidth limits' sbc = SimpleConnectionBWConfig() sbc.getChannelBandwidth()[IBandwidthConfigure.OVERALL_CHANNEL] = 1024 * 1024 sbc.getChannelInitialBurst()[IBandwidthConfigure.OVERALL_CHANNEL] = 128 * 1024 conn.setBandwidthConfigure(sbc) return 1
def appConnect(self, conn, params): ApplicationAdapter.appConnect(self, conn, params) print 'Python appConnect:', conn, params return 1
def appStart(self, app): ApplicationAdapter.appStart(self, app) print 'Python appStart', app self.appScope = app return 1