Lines Matching refs:self

14     def __init__(self, port=0):  argument
15 self.sock = _qrtr.qrtr_open(port)
16 if self.sock < 0:
18 self.service = None
19 self._qrtr = _qrtr
21 def __del__(self): argument
22 self._qrtr.qrtr_close(self.sock)
24 def _lookup_list_add(self, ptr, srv, instance, node, port): argument
28 def lookup(self, srv, instance=0, ifilter=0): argument
30 err = _qrtr.qrtr_lookup(self.sock, srv, instance, ifilter,
31 qrtr._cbtype(self._lookup_list_add), cast(pointer(py_object(results)), c_void_p))
36 def publish(self, service, version, instance): argument
37 err = _qrtr.qrtr_publish(self.sock, service, version, instance)
40 self.service = (service, version, instance)
42 def new_server(self, service, version, instance): argument
43 err = _qrtr.qrtr_new_server(self.sock, service, version, instance)
46 self.service = (service, version, instance)
48 return self.service
50 def remove_server(self, service): argument
51 err = _qrtr.qrtr_remove_server(self.sock, *service)
54 self.service = None
56 def new_lookup(self, service, version, instance): argument
57 err = _qrtr.qrtr_new_lookup(self.sock, service, version, instance)
62 def remove_lookup(self, lookup): argument
63 err = _qrtr.qrtr_remove_lookup(self.sock, *lookup)
67 def send(self, addr, data): argument
69 n = _qrtr.qrtr_sendto(self.sock, node, port, c_char_p(data), len(data))
73 def recv(self, sz=65536): argument
75 n = _qrtr.qrtr_recv(self.sock, c_char_p(ctypes.addressof(buf)), sz)
80 def recvfrom(self, sz=65536): argument
84 n = _qrtr.qrtr_recvfrom(self.sock, c_char_p(ctypes.addressof(buf)),
90 def poll(self, tout=0): argument
91 return _qrtr.qrtr_poll(self.sock, tout)