Beispiel #1
0
	def send(self, data):
		if self.client == None:
			ip = sbserver.ip()
			if ip != None:
				reactor.connectTCP(master_host, int(master_port), self, 30, (sbserver.ip(), sbserver.port()))
			else:
				reactor.connectTCP(master_host, int(master_port), self)
			self.send_buffer.append(data)
		else:
			self.client.sendLine(data)
Beispiel #2
0
 def send(self, data):
     if self.client == None:
         ip = sbserver.ip()
         if ip != None:
             reactor.connectTCP(master_host, int(master_port), self, 30,
                                (sbserver.ip(), sbserver.port()))
         else:
             reactor.connectTCP(master_host, int(master_port), self)
         self.send_buffer.append(data)
     else:
         self.client.sendLine(data)
Beispiel #3
0
def registerServer():
    factory.response_handler.responses_needed += 1
    factory.send('regserv %i' % sbserver.port())
Beispiel #4
0
def registerServer():
	factory.response_handler.responses_needed += 1
	factory.send('regserv %i' % sbserver.port())
Beispiel #5
0
def port():
	'''Port server is bound to.'''
	return sbserver.port()