litex_server: check socket flags exist before using them
authorSean Cross <sean@xobs.io>
Sat, 20 Apr 2019 09:28:26 +0000 (17:28 +0800)
committerSean Cross <sean@xobs.io>
Sat, 20 Apr 2019 09:28:26 +0000 (17:28 +0800)
commitf71b8d4f57371761dc0a8ae5fb531ee75ca732a3
treed0743124f7e5aa96d53d61a0b15ea02e29255743
parent9ee6c35b42be6eadcf9fdd3c4497e1523900f802
litex_server: check socket flags exist before using them

Some flags are only available on certain platforms.  Verify these flags
exist prior to using them when opening a socket.

See
https://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t
for more information

Signed-off-by: Sean Cross <sean@xobs.io>
litex/tools/litex_server.py