示例#1
0
    def connect(self):

        TransactionalResource.connect(self)

        self._socket = socket(AF_INET, SOCK_DGRAM)
        try:
            if self._broadcast:
                self._socket.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
            else:
                self._socket.connect(self._server_address)
        except:
            self._socket.close()
            raise
示例#2
0
 def connect(self):
     TransactionalResource.connect(self)
     self._connect(self)
示例#3
0
 def connect(self):
     TransactionalResource.connect(self)
     self._connect(self)
示例#4
0
 def connect(self):
     TransactionalResource.connect(self)
     self._attrs = []
     self._http_resource.connect()
示例#5
0
 def connect(self):
     TransactionalResource.connect(self)
     connect_timeout = Timeout(
         min(self._connect_timeout, pmnc.request.remain))
     self._connection.connect(connect_timeout)
     self._attrs = []
示例#6
0
 def connect(self):
     TransactionalResource.connect(self)
     self._start_adapter("resource instance", self.name,
                         Timeout(pmnc.request.remain))
示例#7
0
 def connect(self):
     TransactionalResource.connect(self)
     self._interface = pmnc.interfaces.get_interface(self._interface_name)
     if self._interface is None:
         raise Exception("interface {0:s} is unavailable".format(self._interface_name))