Expand description
The adapter module contains the CoreAdapter
trait and other related types.
It is used to implement communication between socket.io servers to share messages and state.
The CoreLocalAdapter
provide a local implementation that will allow any implementors to apply local
operations (broadcast_with_ack
, broadcast
, rooms
, etc…).
Modules§
Structs§
- Broadcast
Iter - An iterator that yields the socket ids that match the broadcast options.
Used with the
SocketEmitter
interface. - Broadcast
Options - Options that can be used to modify the behavior of the broadcast methods.
- Core
Local Adapter - The default adapter. Store the state in memory.
- Remote
Socket Data - Represent the data of a remote socket.
Enums§
- Broadcast
Flags - Flags that can be used to modify the behavior of the broadcast methods.
Traits§
- Core
Adapter - An adapter is responsible for managing the state of the namespace. This adapter can be implemented to share the state between multiple servers.
- Defined
Adapter - A trait to add a “defined” bound to adapter types.
This allow the socket io library to implement function given a defined adapter
and not a generic
A: Adapter
. - Room
Param - A trait for types that can be used as a room parameter.
- Socket
Emitter - The
SocketEmitter
will be implemented by the socketioxide library. It is simply used as an abstraction to allow the adapter to communicate with the socket server without the need to depend on the socketioxide lib. - Spawnable
- For static namespaces, the init response will be managed by the user. However, for dynamic namespaces, the socket.io client will manage the response. As it does not know the type of the response, the spawnable trait is used to spawn the response. Without the client having to know the type of the response.
Type Aliases§
- AckStream
Item - A item yield by the ack stream.
- Room
- A room identifier