-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_commands.txt
115 lines (84 loc) · 3.07 KB
/
run_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# without input/output
./mync -e "./ttt 123456789"
# tcp
# tcp server
./mync -e "./ttt 123456789" -i TCPS4269
./mync -e "./ttt 123456789" -o TCPS4269
./mync -e "./ttt 123456789" -b TCPS4269
# tcp client
./mync -e "./ttt 123456789" -i TCPClocalhost,6699
./mync -e "./ttt 123456789" -o TCPClocalhost,6699
./mync -e "./ttt 123456789" -b TCPClocalhost,6699
# udp
# udp server
./mync -e "./ttt 123456789" -i UDPS4269 -t 5
./mync -e "./ttt 123456789" -o UDPS4269 -t 5
./mync -e "./ttt 123456789" -b UDPS4269 -t 5
# udp client
./mync -e "./ttt 123456789" -i UDPClocalhost,6699 -t 5
./mync -e "./ttt 123456789" -o UDPClocalhost,6699 -t 5
./mync -e "./ttt 123456789" -b UDPClocalhost,6699 -t 5
# UDS
# stream
# stream server
./mync -e "./ttt 123456789" -i UDSSShoi.socket
./mync -e "./ttt 123456789" -o UDSSShoi.socket
./mync -e "./ttt 123456789" -b UDSSDhoi.socket
# stream client
./mync -e "./ttt 123456789" -i UDSCShoi.socket
./mync -e "./ttt 123456789" -o UDSCShoi.socket
./mync -e "./ttt 123456789" -b UDSCDhoi.socket
# datagram
# datagram server (only -i is possible)
./mync -e "./ttt 123456789" -i UDSSDhoi.socket
# datagram client (only -o is possible)
./mync -e "./ttt 123456789" -o UDSCDhoi.socket
# examples
# open a TCP server and wait for a input from a client. output go to stdout
# server
./mync -e "./ttt 123456789" -i TCPS4269
# client
nc localhost 4269
# open a TCP server and wait for a input from a client. output go to client
# server
./mync -e "./ttt 123456789" -b TCPS4269
# client
nc localhost 4269
# open a UDP server and wait for a input from a client, the output go to TCP server that listen on port 6699
# TCP server
nc -l -p 6699
# UDP server & TCP client
./mync -e "./ttt 123456789" -i UDPS4269 -o TCPClocalhost,6699
# UDP client
nc -u localhost 4269
# open a UDS stream server and wait for a input from a client, the output go to TCP server that listen on port 6699
# TCP server
nc -l -p 6699
# UDS stream server & TCP client
./mync -e "./ttt 123456789" -i UDSSShoi.socket -o TCPClocalhost,6699
# UDS stream client
nc -U hoi.socket
# open a UDS datagram server & UDP server, the input is from the UDS client and the output go to the UDP client
# servers
./mync -e "./ttt 123456789" -i UDSSDhoi.socket -o UDPS4269
# UDS client
socat - UNIX-SENDTO:hoi.socket
# UDP client
nc -u localhost 4269
# ~~ netcat ~~
# TCP server:
nc -l -p 6699
# TCP client:
nc localhost 4269
# UDP server:
nc -u -l -p 6699
# UDP client:
nc -u localhost 4269
# Unix domain socket stream server:
nc -lU hoi.socket
# Unix domain socket stream client:
nc -U hoi.socket
# Unix domain socket datagram server:
socat UNIX-RECVFROM:hoi.socket,fork -
# Unix domain socket datagram client:
socat - UNIX-SENDTO:hoi.socket