class TextServiceController: ''' Starts text service. ''' def __init__(self, host, port): ''' Starts text service **Arguments** *host* host where text service is running *port* port that text service is using ''' self.uniqueId = str(GUID()) self.textService = TextService((host, int(port))) self.textService.start() self.textService.AddChannel(self.uniqueId) def GetChannelId(self): return self.uniqueId def GetLocation(self): return self.textService.GetLocation() def ShutDown(self): print 'stop text service' self.textService.Stop()
def __init__(self, host, port): ''' Starts text service **Arguments** *host* host where text service is running *port* port that text service is using ''' self.uniqueId = str(GUID()) self.textService = TextService((host, int(port))) self.textService.start() self.textService.AddChannel(self.uniqueId)