Sockets
Classes
SocketDefault
SocketDefault (
address : StrShaSoc ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Bind using default protocol. See default_socket_type option.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketFastcgi
SocketFastcgi (
address : StrShaSoc ,
nph : bool = False ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Bind to the specified socket using FastCGI.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketHttp
SocketHttp (
address : StrShaSoc ,
http11 : bool = False ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Bind to the specified socket using HTTP
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketHttps
SocketHttps (
address : StrShaSoc ,
cert : str ,
key : str ,
ciphers : str | None = None ,
client_ca : str | None = None ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Bind to the specified socket using HTTPS
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
get_certbot_paths
. get_certbot_paths (
domain : str , # (1)!
) -> tuple [ str , str ]
Domain name to get filepaths for.
Returns a tuple of paths for files (certificates_chain, private_key)
from Certbot https://certbot.eff.org
Those paths can be used to pass into Socket initializer.
Note
If files not found empty strings are returned.
SocketRaw
SocketRaw (
address : StrShaSoc ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Bind to the specified UNIX/TCP socket using RAW protocol.
Raw mode allows you to directly parse the request in your application callable.
Instead of getting a list of CGI vars/headers in your callable you only get
the file descriptor soon after accept().
You can then read()/write() to that file descriptor in full freedom.
Note
Raw mode disables request logging.
Warning
Use it as a low-level socket wrapper.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketScgi
SocketScgi (
address : StrShaSoc ,
nph : bool = False ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Bind to the specified UNIX/TCP socket using SCGI protocol.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketShared
SocketShared (
address : str ,
undeferred : bool = False ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Create a shared socket for advanced jailing or IPC purposes.
Allows you to create a socket early in the server's startup
and use it after privileges drop or jailing. This can be used
to bind to privileged (<1024) ports.
Shared sockets are a way to share sockets among various uWSGI components:
you can use that to share a socket between the fastrouter and uWSGI instance.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketUdp
SocketUdp (
address : StrShaSoc ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Run the udp server on the specified address.
Note
Mainly useful for SNMP or shared UDP logging.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketUwsgi
SocketUwsgi (
address : StrShaSoc ,
persistent : bool = False ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
uwSGI specific socket using uwsgi protocol.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
SocketUwsgis
SocketUwsgis (
address : StrShaSoc ,
cert : str ,
key : str ,
ciphers : str | None = None ,
client_ca : str | None = None ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
SocketHttps
uwSGI specific socket using uwsgi protocol over SSL.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.
get_certbot_paths
. get_certbot_paths (
domain : str , # (1)!
) -> tuple [ str , str ]
Domain name to get filepaths for.
Returns a tuple of paths for files (certificates_chain, private_key)
from Certbot https://certbot.eff.org
Those paths can be used to pass into Socket initializer.
Note
If files not found empty strings are returned.
SocketZeromq
SocketZeromq (
address : StrShaSoc ,
bound_workers : Strlist = None ,
modifier : Modifier = None
)
Socket
Introduce zeromq pub/sub pair.
alias
Alias to address this value.
name_separator
. name_separator : str = ':'
Separator to add after name portion.
name_separator_strip
. name_separator_strip : bool = False
Strip leading and trailing name separator from the result.
plugin
. plugin : bool | str = False
Indication this option group belongs to a plugin.