Beispiel #1
0
 def get_connections(self, kind='inet'):
     if kind not in conn_tmap:
         raise ValueError("invalid %r kind argument; choose between %s"
                          % (kind, ', '.join([repr(x) for x in conn_tmap])))
     families, types = conn_tmap[kind]
     ret = _psutil_mswindows.get_process_connections(self.pid, families, types)
     return [ntuple_connection(*conn) for conn in ret]
Beispiel #2
0
 def get_connections(self, kind='inet'):
     if kind not in conn_tmap:
         raise ValueError("invalid %r kind argument; choose between %s"
                          % (kind, ', '.join([repr(x) for x in conn_tmap])))
     families, types = conn_tmap[kind]
     ret = _psutil_mswindows.get_process_connections(self.pid, families, types)
     return [nt_connection(*conn) for conn in ret]
Beispiel #3
0
 def get_connections(self, kind='inet'):
     if kind not in conn_tmap:
         raise ValueError("invalid %r kind argument; choose between %s"
                          % (kind, ', '.join([repr(x) for x in conn_tmap])))
     families, types = conn_tmap[kind]
     rawlist = _psutil_mswindows.get_process_connections(self.pid, families,
                                                         types)
     ret = []
     for item in rawlist:
         fd, fam, type, laddr, raddr, status = item
         status = TCP_STATES_TABLE[status]
         nt = nt_connection(fd, fam, type, laddr, raddr, status)
         ret.append(nt)
     return ret
Beispiel #4
0
 def get_connections(self):
     retlist = _psutil_mswindows.get_process_connections(self.pid)
     return [ntuple_connection(*conn) for conn in retlist]
Beispiel #5
0
 def get_connections(self):
     retlist = _psutil_mswindows.get_process_connections(self.pid)
     return [ntuple_connection(*conn) for conn in retlist]