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
[DOCUMENTATION] Improved FAQ some more (- WIP #425 -)
Additions with file docs/INSTALL.md:
* initial draft of INSTALL guide
Additions with file docs/SECURITY.md:
* minimal Draft for SECURITY
Changes in file docs/FAQ.md:
* various improvements
|`--daemon`| This option runs the multicast listener as a background daemon. |
44
+
|`--use-std`| This specifies the action to take when any output is produced. In this case, it uses the standard output to print received messages instead of the default to just log messages. |
45
+
|`HEAR`| This specifies the action to take. In this case, it will _receive_ multicast. |
46
+
|`--port 59595`| This sets the UDP port number to `59595`, which is used to identify/filter the multicast messages that will be accepted. |
47
+
|`--group 224.0.0.1`| This specifies the multicast group address to join. You can replace `224.0.0.1` with your desired multicast group address. |
35
48
36
-
If all went well, `multicast` is now installed and working :tada:
49
+
##### Steps to Run
37
50
38
-
### How do I use this `multicast` to receive some UDP multicast?
51
+
1. Open your terminal.
52
+
2. Ensure you have the multicast module installed and accessible.
53
+
3. Run the command above, adjusting the port and group as needed for your specific use case.
39
54
40
-
(assuming `multicast` is set up, installed and you want to listen on 0.0.0.0)
55
+
Most users will want to stick to using `HEAR` when receiving multicast from the CLI. Alternatively,
56
+
users can use the ephemeral `RECV`_(by omitting the `--daemon` flag)_ to receive individual UDP
### What is the basic API via python (instead of bash like above)?
83
+
| Explanation of the Command-Line Options ||
84
+
|---------------------|---------------------|
85
+
|`SAY`| This specifies the action to take. In this case, it will _transmit_ multicast. |
86
+
|`--group 224.0.0.1`| This specifies the multicast group address to transmit messages to. You can replace `224.0.0.1` with your desired multicast group address. |
87
+
|`--port 59595`| This sets the UDP port number to `59595`, which is used by other members of the multicast group to help identify/filter the multicast messages to accept. |
88
+
|`--message`| This specifies the rest of the input is to be the message to transmit. |
89
+
|`"Hello World!"`| This specifies the multicast message content to _transmit_. In this case, it is the greeting "Hello World!" |
90
+
91
+
##### Steps to Run
92
+
93
+
1. Open your terminal.
94
+
2. Ensure you have the multicast module installed and accessible.
95
+
3. Run the command above, adjusting the message, port and group as needed for your specific use case.
96
+
97
+
This command will allow you to quickly prototype sending multicast messages without needing to
98
+
write a full Python script. You can test the sending functionality alongside the receiving
99
+
functionality to ensure that messages are being transmitted and received correctly.
100
+
101
+
### What is the basic `multicast` Python API?
71
102
72
103
> [!WARNING]
73
-
> Caveat: this module is still a BETA
74
-
[Here is how it is tested right now](https://github.com/reactive-firewall/multicast/blob/389c93eb86e012a38edb88b3b81c7d4aa55e843a/tests/test_hear_cleanup.py#L54C2-L96C43)
104
+
> Caveat: this example is still prototype focused, and should be considered a minimal
# Hint: use a loop to repeat or different arguments to vary message.
262
+
p.start()
138
263
exceptExceptionas baton:
139
-
p.join()
264
+
p.join()# good practice to handle clean up
140
265
raiseRuntimeError("multicast seems to have failed.") from baton # re-raise
141
266
finally:
142
267
# clean up some stuff
143
268
if p:
144
269
p.join() # if not already handled don't forget to join the process and other overhead
145
270
# hint: if you use a loop and need to know the exit code
146
271
didWork = (p isnotNoneandint(p.exitcode) <=int(0)) # e.g. check for success
272
+
147
273
```
148
274
149
275
> [!WARNING]
150
-
> Caveat: the above examples assume the reader is knowledgeable about general `IPC` theory and
151
-
> the standard python `multiprocessing` module and its use.
276
+
> Caveat: the above examples assume the reader is knowledgeable about general
277
+
> interprocess communication theory and the standard python `multiprocessing` module and its use.
278
+
> Together these examples demonstrate a trivial message passing IPC using multicast python sockets.
152
279
153
280
Here is a
154
281
[more CLI focused way to test](https://github.com/reactive-firewall/multicast/blob/389c93eb86e012a38edb88b3b81c7d4aa55e843a/tests/test_usage.py#L385C2-L432C43)
155
-
as another example of how to use the module.
282
+
as another trivial example of how to use the module.
283
+
284
+
### How do I run and interpret the test suite for this project?
285
+
286
+
To run the test suite, follow the instructions in the [Testing Guide](https://github.com/reactive-firewall/multicast/tree/HEAD/docs/Testing.md).
287
+
288
+
The guide explains test organization, and how to run tests outside CI/CD.
289
+
290
+
### How is continuous integration (CI) set up for this repository?
291
+
292
+
CI is configured as described in the [CI Guide](https://github.com/reactive-firewall/multicast/tree/HEAD/docs/CI.md).
293
+
Key points:
294
+
295
+
Automated builds and tests are run via GitHub Actions. Each pull request is tested for
296
+
compatibility and code quality. The guide details the CI workflow files, environment variables,
297
+
and what to expect when contributing changes.
156
298
157
299
### What are the defaults?
158
300
@@ -170,7 +312,7 @@ From the
170
312
#### Default Multicast Bind Address
171
313
172
314
> [!NOTE]
173
-
> The **default** multicast bind address is the **default** group. This is efectivly`224.0.0.1`.
315
+
> The **default** multicast bind address is the **default** group. This is effectively`224.0.0.1`.
0 commit comments