blob: 0cc63ccf4d44241f40ff82564a65165a866107e3 (
plain)
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
|
#!/bin/bash
# build
cargo build --release --example chat
tmux new-session -d -s karyon_chat
tmux send-keys -t karyon_chat "../../target/release/examples/chat --username 'user1'\
-l 'tcp://127.0.0.1:40000' -d '40010'" Enter
tmux split-window -h -t karyon_chat
tmux send-keys -t karyon_chat "../../target/release/examples/chat --username 'user2'\
-l 'tcp://127.0.0.1:40001' -d '40011' -b 'tcp://127.0.0.1:40010 ' " Enter
tmux split-window -h -t karyon_chat
tmux send-keys -t karyon_chat "../../target/release/examples/chat --username 'user3'\
-l 'tcp://127.0.0.1:40002' -d '40012' -b 'tcp://127.0.0.1:40010'" Enter
tmux split-window -h -t karyon_chat
tmux send-keys -t karyon_chat "../../target/release/examples/chat --username 'user4'\
-b 'tcp://127.0.0.1:40010'" Enter
tmux select-layout tiled
tmux attach -t karyon_chat
|