接口 WebsocketSession


public interface WebsocketSession
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Close the connection to the remote end point using the code javax.websocket.CloseReason.CloseCodes#NORMAL_CLOSURE and an empty reason phrase.
    Provides a unique identifier for the session.
    void
     
  • 方法详细资料

    • getId

      String getId()
      Provides a unique identifier for the session. This identifier should not be relied upon to be generated from a secure random source.
      返回:
      A unique identifier for the session.
    • close

      void close() throws IOException
      Close the connection to the remote end point using the code javax.websocket.CloseReason.CloseCodes#NORMAL_CLOSURE and an empty reason phrase.
      抛出:
      IOException - if an I/O error occurs while the WebSocket session is being closed.
    • send

      void send(String s) throws IOException
      抛出:
      IOException