You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/freenet-ping/README.md
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -85,23 +85,28 @@ This project includes two Makefiles to help you set up and run a local Freenet n
85
85
-`run-ping.mk`: Builds and runs the ping application.
86
86
87
87
### Start Local Network
88
+
88
89
1. Navigate to the `freenet-core/scripts` directory:
90
+
89
91
```bash
90
92
cd freenet-core/scripts
91
93
```
92
94
93
95
2. First, clean any previous setup and create necessary directories:
96
+
94
97
```bash
95
98
make -f local-network.mk clean
96
99
make -f local-network.mk setup N_GATEWAYS=1 N_NODES=2
97
100
```
98
101
99
102
3. Start the gateway:
103
+
100
104
```bash
101
105
make -f local-network.mk start-gateways N_GATEWAYS=1
102
106
```
103
107
104
108
4. Start the nodes:
109
+
105
110
```bash
106
111
make -f local-network.mk start-nodes N_NODES=2
107
112
```
@@ -112,6 +117,7 @@ This project includes two Makefiles to help you set up and run a local Freenet n
112
117
```
113
118
114
119
The network will be configured with:
120
+
115
121
- 1 Gateway on port 3101
116
122
- Node 1: WebSocket port 3001, Network port 3102
117
123
- Node 2: WebSocket port 3002, Network port 3103
@@ -135,26 +141,30 @@ make -f local-network.mk clean
135
141
## Build and Run Ping
136
142
137
143
1. Navigate to the `freenet-core/apps/freenet-ping` directory:
144
+
138
145
```bash
139
146
cd freenet-core/apps/freenet-ping
140
147
```
141
148
142
149
1. View available options:
150
+
143
151
```bash
144
152
make -f run-ping.mk help
145
153
```
146
154
147
-
2. Build the contract and application:
155
+
1. Build the contract and application:
156
+
148
157
```bash
149
158
make -f run-ping.mk build
150
159
```
151
160
152
-
3. Run ping towards node 1:
161
+
1. Run ping towards node 1:
153
162
```bash
154
163
make -f run-ping.mk run WS_PORT=3001
155
164
```
156
165
157
166
You will see something like this:
167
+
158
168
```bash
159
169
2024-05-14T15:33:20.685412Z INFO freenet_ping: 154: put ping contract successfully! key=Cuj4LbFao6vzZ5VtvZAKZ64Y99qNh7MpTUdaCcEkU4oR
160
170
2024-05-14T15:33:20.729883Z INFO freenet_ping: 146: Hello, ubiquitous-letters!
@@ -163,6 +173,7 @@ You will see something like this:
163
173
```
164
174
165
175
You can customize the ping behavior with these parameters:
176
+
166
177
```bash
167
178
make -f run-ping.mk run WS_PORT=3001 FREQUENCY=2000 TTL=7200
168
179
```
@@ -182,4 +193,4 @@ make -f run-ping.mk clean
182
193
183
194
## Feedback
184
195
185
-
If you encounter any issues please let us know in our [Matrix](https://matrix.to/#/#freenet-locutus:matrix.org) channel or by submitting a [Github Issue](https://github.com/freenet/freenet-core/issues).
196
+
If you encounter any issues please let us know in our [Matrix](https://matrix.to/#/#freenet-locutus:matrix.org) channel or by submitting a [Github Issue](https://github.com/freenet/freenet-core/issues).
0 commit comments