pub struct FeagiWebSocketServerPublisher { /* private fields */ }Expand description
A WebSocket server that broadcasts data to all connected clients.
Implementations§
Source§impl FeagiWebSocketServerPublisher
impl FeagiWebSocketServerPublisher
Sourcepub fn client_count(&self) -> usize
pub fn client_count(&self) -> usize
Get the number of connected clients.
Trait Implementations§
Source§impl FeagiServer for FeagiWebSocketServerPublisher
impl FeagiServer for FeagiWebSocketServerPublisher
Source§fn poll(&mut self) -> &FeagiEndpointState
fn poll(&mut self) -> &FeagiEndpointState
Advances the internal state machine and returns the current state. Read more
Source§fn request_start(&mut self) -> Result<(), FeagiNetworkError>
fn request_start(&mut self) -> Result<(), FeagiNetworkError>
Initiates binding to the configured address and starts listening. Read more
Source§fn request_stop(&mut self) -> Result<(), FeagiNetworkError>
fn request_stop(&mut self) -> Result<(), FeagiNetworkError>
Initiates stopping the server and unbinding from the address. Read more
Source§fn confirm_error_and_close(&mut self) -> Result<(), FeagiNetworkError>
fn confirm_error_and_close(&mut self) -> Result<(), FeagiNetworkError>
Acknowledges an error and closes the server. Read more
Source§fn get_bind_point(&self) -> TransportProtocolEndpoint
fn get_bind_point(&self) -> TransportProtocolEndpoint
Gets the local bind point
Source§fn get_agent_endpoint(&self) -> TransportProtocolEndpoint
fn get_agent_endpoint(&self) -> TransportProtocolEndpoint
Gets the bind point that is given to agents (the remote bind point)
fn get_protocol(&self) -> TransportProtocolImplementation
Source§impl FeagiServerPublisher for FeagiWebSocketServerPublisher
impl FeagiServerPublisher for FeagiWebSocketServerPublisher
Source§fn publish_data(&mut self, data: &[u8]) -> Result<(), FeagiNetworkError>
fn publish_data(&mut self, data: &[u8]) -> Result<(), FeagiNetworkError>
Broadcasts data to all connected subscribers. Read more
Source§fn as_boxed_publisher_properties(
&self,
) -> Box<dyn FeagiServerPublisherProperties>
fn as_boxed_publisher_properties( &self, ) -> Box<dyn FeagiServerPublisherProperties>
Creates a boxed properties object for this publisher. Read more
Auto Trait Implementations§
impl Freeze for FeagiWebSocketServerPublisher
impl !RefUnwindSafe for FeagiWebSocketServerPublisher
impl Send for FeagiWebSocketServerPublisher
impl Sync for FeagiWebSocketServerPublisher
impl Unpin for FeagiWebSocketServerPublisher
impl UnsafeUnpin for FeagiWebSocketServerPublisher
impl !UnwindSafe for FeagiWebSocketServerPublisher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more