pull/319/head
Yang Hau 2 years ago
parent c7e9e0cbae
commit 984ad9d6c7
  1. 2
      src/handshake/server.rs
  2. 2
      src/protocol/mod.rs

@ -208,7 +208,7 @@ pub struct ServerHandshake<S, C> {
impl<S: Read + Write, C: Callback> ServerHandshake<S, C> { impl<S: Read + Write, C: Callback> ServerHandshake<S, C> {
/// Start server handshake. `callback` specifies a custom callback which the user can pass to /// Start server handshake. `callback` specifies a custom callback which the user can pass to
/// the handshake, this callback will be called when the a websocket client connnects to the /// the handshake, this callback will be called when the a websocket client connects to the
/// server, you can specify the callback if you want to add additional header to the client /// server, you can specify the callback if you want to add additional header to the client
/// upon join based on the incoming headers. /// upon join based on the incoming headers.
pub fn start(stream: S, callback: C, config: Option<WebSocketConfig>) -> MidHandshake<Self> { pub fn start(stream: S, callback: C, config: Option<WebSocketConfig>) -> MidHandshake<Self> {

@ -204,7 +204,7 @@ impl<Stream: Read + Write> WebSocket<Stream> {
/// There is no need to call it again. Calling this function is /// There is no need to call it again. Calling this function is
/// the same as calling `write_message(Message::Close(..))`. /// the same as calling `write_message(Message::Close(..))`.
/// ///
/// After queing the close frame you should continue calling `read_message` or /// After queuing the close frame you should continue calling `read_message` or
/// `write_pending` to drive the close handshake to completion. /// `write_pending` to drive the close handshake to completion.
/// ///
/// The websocket RFC defines that the underlying connection should be closed /// The websocket RFC defines that the underlying connection should be closed

Loading…
Cancel
Save