Esempio n. 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
Esempio n. 2
0
 def connect(self):
     TransactionalResource.connect(self)
     self._connect(self)
Esempio n. 3
0
 def connect(self):
     TransactionalResource.connect(self)
     self._connect(self)
Esempio n. 4
0
 def connect(self):
     TransactionalResource.connect(self)
     self._attrs = []
     self._http_resource.connect()
Esempio n. 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 = []
Esempio n. 6
0
 def connect(self):
     TransactionalResource.connect(self)
     self._start_adapter("resource instance", self.name,
                         Timeout(pmnc.request.remain))
Esempio n. 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))