Пример #1
0
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()
Пример #2
0
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()
Пример #3
0
    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)
Пример #4
0
    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)