pub type TcpComponent = Component<TcpServerConnector>;
Available on crate feature
insecure-tcp
only.Expand description
Component that connects over TCP
Aliased Type§
struct TcpComponent {
pub jid: Jid,
/* private fields */
}
Fields§
§jid: Jid
The component’s Jabber-Id
Implementations
Source§impl<C: ServerConnector> Component<C>
impl<C: ServerConnector> Component<C>
Source§impl<C: ServerConnector> Component<C>
impl<C: ServerConnector> Component<C>
Sourcepub async fn new_with_connector(
jid: &str,
password: &str,
connector: C,
timeouts: Timeouts,
) -> Result<Self, Error>
pub async fn new_with_connector( jid: &str, password: &str, connector: C, timeouts: Timeouts, ) -> Result<Self, Error>
Start a new XMPP component.
Unfortunately StartTlsConnector
is not supported yet.
The tracking issue is #143.
Trait Implementations
Source§impl<C: ServerConnector> Sink<Stanza> for Component<C>
impl<C: ServerConnector> Sink<Stanza> for Component<C>
Source§fn start_send(self: Pin<&mut Self>, item: Stanza) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Stanza) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreSource§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read more