Expand description
Server side of this library.
§Writing servers
There are two ways of accepting connections:
- implement the Server trait and let run_on_socket/run_on_address handle everything
- accept connections yourself and pass them to run_stream
In both cases, you’ll first need to implement the Handler trait - this is where you’ll handle various events.
Check out the following examples:
- Server that forwards your input to all connected clients
- Server handing channel processing off to a library (here,
russh-sftp
) - Serving
ratatui
based TUI app to clients: per-client, shared
Structs§
- Configuration of a server.
- Handle to a session, used to send messages to a client outside of the request/response cycle.
- A client’s response in a challenge-response authentication.
- An active server session returned by run_stream.
- A connected server session. This type is unique to a client.
Enums§
- An authentication result, in a challenge-response authentication.
Traits§
- Server handler. Each client will have their own handler.
- Trait used to create new handlers when clients connect.
Functions§
- Run a single connection to completion.