Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebSocketConnectOptions

Options describing how an HttpClient connect a WebSocket.

Hierarchy

Index

Constructors

constructor

Methods

addHeader

  • Add a request header.

    Parameters

    • key: string
    • headers: string

    Returns WebSocketConnectOptions

addSubProtocol

  • Set the WebSocket sub protocols to use.

    Parameters

    • subProtocols: string

    Returns WebSocketConnectOptions

getAllowOriginHeader

  • getAllowOriginHeader(): boolean
  • Set whether to add the origin header to the WebSocket handshake request, enabled by default.

    Set to false when a server does not accept WebSocket with an origin header.

    Returns boolean

getFollowRedirects

  • getFollowRedirects(): boolean
  • Set whether to follow HTTP redirect

    Returns boolean

getHost

  • getHost(): string
  • Set the host name to be used by the client request.

    Returns string

getPort

  • getPort(): number
  • Set the port to be used by the client request.

    Returns number

getProxyOptions

getServer

  • Set the server address to be used by the client request.

    When the server address is null, the address will be resolved after the host property by the Vert.x resolver.

    Use this when you want to connect to a specific server address without name resolution.

    Returns SocketAddress

getSubProtocols

  • getSubProtocols(): string[]
  • Set the WebSocket sub protocols to use.

    Returns string[]

getTimeout

  • getTimeout(): number
  • Sets the amount of time after which if the WebSocket handshake does not happen within the timeout period an will be passed to the exception handler and the connection will be closed.

    Returns number

getTraceOperation

  • getTraceOperation(): string
  • Override the operation the tracer use for this request. When no operation is set, the HTTP method is used instead.

    Returns string

getURI

  • getURI(): string
  • Set the request relative URI.

    Returns string

getVersion

  • Set the WebSocket version.

    Returns WebsocketVersion

isRegisterWriteHandlers

  • isRegisterWriteHandlers(): boolean
  • Whether write-handlers should be registered on the EventBus.

    Defaults to false.

    Returns boolean

isSsl

  • isSsl(): boolean
  • Set whether SSL/TLS is enabled.

    Returns boolean

setAbsoluteURI

  • Parse an absolute URI to use, this will update the ssl, host, port and uri fields.

    Parameters

    • absoluteURI: string

    Returns WebSocketConnectOptions

setAllowOriginHeader

  • Set whether to add the origin header to the WebSocket handshake request, enabled by default.

    Set to false when a server does not accept WebSocket with an origin header.

    Parameters

    • allowOriginHeader: boolean

    Returns WebSocketConnectOptions

setFollowRedirects

setHost

setPort

setProxyOptions

setRegisterWriteHandlers

  • Whether write-handlers should be registered on the EventBus.

    Defaults to false.

    Parameters

    • registerWriteHandlers: boolean

    Returns WebSocketConnectOptions

setServer

  • Set the server address to be used by the client request.

    When the server address is null, the address will be resolved after the host property by the Vert.x resolver.

    Use this when you want to connect to a specific server address without name resolution.

    Parameters

    Returns WebSocketConnectOptions

setSsl

setSubProtocols

  • Set the WebSocket sub protocols to use.

    Parameters

    • subProtocols: string[]

    Returns WebSocketConnectOptions

setTimeout

  • Sets the amount of time after which if the WebSocket handshake does not happen within the timeout period an will be passed to the exception handler and the connection will be closed.

    Parameters

    • timeout: number

    Returns WebSocketConnectOptions

setTraceOperation

  • Override the operation the tracer use for this request. When no operation is set, the HTTP method is used instead.

    Parameters

    • traceOperation: string

    Returns WebSocketConnectOptions

setURI

setVersion

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc