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
[PATCH] minore tweaks to comments and documentation.
Changes in file docs/FAQ.md:
# assuming already did 'import multicast as multicast'
# cd /MY-AWESOME-DEV-PATH
# clean up some stuff
# spawn a listening proc
#### DONE
#### Default Port
Changes in file tests/__init__.py:
- Suppress PYL-W0622
[Here is how it is tested right now](https://github.com/reactive-firewall/multicast/blob/cdd577549c0bf7c2bcf85d1b857c86135778a9ed/tests/test_usage.py#L251-L554)
# Hint: use a loop to repeat or different arguments to vary message.
136
139
exceptException:
137
140
p.join()
@@ -147,6 +150,11 @@ didWork = (int(p.exitcode) <= int(0)) # if you use a loop and need to know the e
147
150
> Caveat: the above examples assume the reader is knowledgeable about general `IPC` theory and
148
151
> the standard python `multiprocessing` module and its use.
149
152
153
+
> [!TIP]
154
+
> Another
155
+
> [more CLI focused way to test](https://github.com/reactive-firewall/multicast/blob/389c93eb86e012a38edb88b3b81c7d4aa55e843a/tests/test_usage.py#L385C2-L432C43)
156
+
> is another example of how to use the module.
157
+
150
158
### What are the defaults?
151
159
152
160
#### Default Multicast Group
@@ -200,33 +208,13 @@ From the
200
208
> It is best to specify the port in use at this time as the default has yet to be properly
201
209
> assigned ( see related reactive-firewall/multicast#62 )
202
210
203
-
### What does exit code _x_ mean?
204
-
205
-
#### Python function return code meanings
206
-
207
-
`0` is the default and implies _success_, and means the process has essentially (or actually)
208
-
returned nothing (or `None`)
209
-
210
-
`1` is used when a _single_ result is returned (caveat: functions may return a single `tuple`
211
-
instead of `None` to indicate exit code `1` by returning a `boolean` success value, and result
212
-
(which may also be encapsulated as an iterable if needed) )
213
-
214
-
`2` is used to indicate a _value and reason_ are returned (caveat: functions may return a single
215
-
`tuple` with a single value and reason and the value can be a `tuple`)
216
-
217
-
`-1` is used to mean _many_ of unspecified length and otherwise functions as `1`
218
-
219
-
* these values loosely map to the principle of _none-one-many_, 0 is none, 1 is, unsurprisingly,
220
-
one, and everything else is many. From this practice it is possible to infer how to handle the
221
-
result, (ie `(int(length-hint), None if len([*result-values])==0 else *result-values)` ).
222
-
223
-
#### CLI exit code meanings
211
+
### CLI exit code meanings
224
212
225
213
`0`**success**
226
214
227
215
`1`**non-success** - and is often accompanied by warnings or errors
228
216
229
-
`2 <`**failure** of specific reason
217
+
`2`-`225`**failure** of specific reason
230
218
231
219
* Any exit value outside the range of `0-255` inclusive should be decoded with the formula:
232
220
`| input % 256 |` which will yield the correct exit code.
0 commit comments