class Miniss::Sockets


Sockets object has properties containing arrays of Sockets from the parsed /proc/net/xxx files.


sockets =
sockets.tcpv4.each do |so|
  puts "#{so.laddr} <-> #{so.raddr}"

Defined in:



Instance Method Summary

Constructor Detail

def #

Initialize Sockets class.

Instance Method Detail

def all #

Returns all sockets

def parse_tcpv4 : Array(Socket) #

Parse all IPv4 TCP sockets from /proc/net/tcp.

def parse_tcpv6 : Array(Socket) #

Parse all IPv6 TCP sockets from /proc/net/tcp6.

def parse_udpv4 : Array(Socket) #

Parse all IPv4 UDP sockets from /proc/net/udp.

def parse_udpv6 : Array(Socket) #

Parse all IPv6 UDP sockets from /proc/net/udp6.

def tcpv4 : Array(Socket) #

Returns all IPv4 TCP sockets

def tcpv6 : Array(Socket) #

Returns all IPv6 TCP sockets

def udpv4 : Array(Socket) #

Returns all IPv4 UDP sockets

def udpv6 : Array(Socket) #

Returns all IPv6 UDP sockets