(self, tool, ss_output)
for each line of `ss_output`, returns a triplet with:
        * a connection state (`established`, `listening`)
        * the receive queue size
        * the send queue size
for each line of `ss_output`, returns a triplet with:
        * a connection state (`established`, `listening`)
        * the receive queue size
        * the send queue size
for each line of ss_output returns a triplet with : * a connection state ( established listening ) * the receive queue size * the send queue size
def _parse_queues(self, tool, ss_output):
        """
        for each line of `ss_output`, returns a triplet with:
        * a connection state (`established`, `listening`)
        * the receive queue size
        * the send queue size
        """
        for line in ss_output.splitlines():
            fields = line.split()

            if len(fields) < (6 if tool == "netstat" else 3):
                continue

            state_column = 0 if tool == "ss" else 5

            try:
                state = self.tcp_states[tool][fields[state_column]]
            except KeyError:
                continue

            yield (state, fields[1], fields[2])
def _parse_queues ( self , tool , ss_output ) : for line in ss_output . splitlines ( ) : fields = line . split ( ) if len ( fields ) < ( 6 if tool == "netstat" else 3 ) : continue state_column = 0 if tool == "ss" else 5 try : state = self . tcp_states [ tool ] [ fields [ state_column ] ] except KeyError : continue yield ( state , fields [ 1 ] , fields [ 2 ] )