This commit is contained in:
parent
b69e7df635
commit
cbab86bd93
1 changed files with 2 additions and 5 deletions
|
|
@ -54,14 +54,11 @@ impl WebsocketConnection {
|
|||
///
|
||||
/// ```no_run
|
||||
/// use tungstenite::http::Uri;
|
||||
/// use servicepoint::{
|
||||
/// Command,
|
||||
/// connections::{WebsocketConnection as WebsocketConnection, Connection}
|
||||
/// };
|
||||
/// use servicepoint::{ClearCommand, WebsocketConnection, Connection};
|
||||
/// let uri = "ws://localhost:8080".parse().unwrap();
|
||||
/// let mut connection = WebsocketConnection::open(uri)
|
||||
/// .expect("could not connect");
|
||||
/// connection.send(Command::Clear)
|
||||
/// connection.send(ClearCommand)
|
||||
/// .expect("send failed");
|
||||
/// ```
|
||||
pub fn open(uri: tungstenite::http::Uri) -> tungstenite::Result<Self> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue