Skip to content

Commit 86a2145

Browse files
committed
Update README.md
1 parent ed416fd commit 86a2145

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,38 @@ $ cd cmd/readwrite2/client
5151
$ go run .
5252
```
5353

54+
### Using encoding/gob package
55+
56+
Open two terminals. the one is following:
57+
58+
```sh
59+
$ cd cmd/usinggob/server
60+
$ go run .
61+
```
62+
63+
and another terminal is following:
64+
65+
```sh
66+
$ cd cmd/usinggob/client
67+
$ go run .
68+
```
69+
70+
## Monitor a local unix domain socket
71+
72+
use socat. install it if not exists.
73+
74+
```sh
75+
$ sudo apt install -y socat
76+
```
77+
78+
and launch server program then input following commands.
79+
80+
```sh
81+
$ mv /tmp/echo.sock /tmp/echo.sock.original
82+
$ socat -t100 -x -v UNIX-LISTEN:/tmp/echo.sock,mode=777,reuseaddr,fork UNIX-CONNECT:/tmp/echo.sock.original
83+
```
84+
85+
### REFERENCES
86+
87+
[Can I monitor a local unix domain socket like tcpdump?](https://superuser.com/questions/484671/can-i-monitor-a-local-unix-domain-socket-like-tcpdump)
88+

0 commit comments

Comments
 (0)