procfs_rb 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24477d343b42d8b0edad4d1cb496191e3499d57da61dcb6a324415de80a7d037
|
|
4
|
+
data.tar.gz: 5cffb3cb5e00e6690b14ca8554d57264ef0282000e1e75ce301491adc3a444bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0df252f70c3609e35fce187b0fce843132c8e980e98a58e2b74cc5458b27636525eb39bf78e1c2ecea0ed136150b77f0d3d4fd8790987fed55d7ac004b3b945d
|
|
7
|
+
data.tar.gz: 7669be12189a58a6e0655b7af7522f8aaaad0b268e042f7e699e4834ffab716a2572c1d09f68c1053a38fa7d857a8ce47791468f0e979b821b98d5d23ea617c6
|
|
@@ -9,6 +9,8 @@ module ProcFS
|
|
|
9
9
|
class TcpSocket
|
|
10
10
|
include Snapshot
|
|
11
11
|
|
|
12
|
+
TCP = 'tcp'
|
|
13
|
+
|
|
12
14
|
# TCP state constants (from linux/tcp_states.h)
|
|
13
15
|
STATES = {
|
|
14
16
|
'01' => :established,
|
|
@@ -25,17 +27,20 @@ module ProcFS
|
|
|
25
27
|
}.freeze
|
|
26
28
|
|
|
27
29
|
MEMBERS = %i[
|
|
30
|
+
protocol
|
|
28
31
|
local_address local_port
|
|
29
32
|
remote_address remote_port
|
|
30
33
|
connection_state
|
|
31
34
|
tx_queue rx_queue
|
|
32
|
-
uid inode
|
|
35
|
+
uid timeout inode
|
|
33
36
|
].freeze
|
|
34
37
|
|
|
35
38
|
attr_reader(*MEMBERS)
|
|
36
39
|
|
|
37
40
|
def initialize(local_address:, local_port:, remote_address:, remote_port:,
|
|
38
|
-
connection_state:, tx_queue:, rx_queue:, uid:, inode
|
|
41
|
+
connection_state:, tx_queue:, rx_queue:, uid:, timeout:, inode:,
|
|
42
|
+
protocol: TCP)
|
|
43
|
+
@protocol = protocol
|
|
39
44
|
@local_address = local_address
|
|
40
45
|
@local_port = local_port
|
|
41
46
|
@remote_address = remote_address
|
|
@@ -44,6 +49,7 @@ module ProcFS
|
|
|
44
49
|
@tx_queue = tx_queue
|
|
45
50
|
@rx_queue = rx_queue
|
|
46
51
|
@uid = uid
|
|
52
|
+
@timeout = timeout
|
|
47
53
|
@inode = inode
|
|
48
54
|
|
|
49
55
|
freeze
|
data/lib/procfs_rb/version.rb
CHANGED