Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SocketSync

Hierarchy

  • SocketSync

Index

Methods

address

  • address(): Object
  • returns an object containing two attributes, address and port, representing the address where the client SocketSync is connected

    Returns Object

connect

  • connect(port: Number, host?: String): void
  • opens the connection for the existing SocketSync to which it is applied

    Parameters

    • port: Number
    • Optional host: String

    Returns void

destroy

  • destroy(): void
  • closes the SocketSync method to which it is applied

    Returns void

end

  • end(): void
  • closes the SocketSync to which it is applied

    Returns void

read

  • returns in a Buffer object the data read from the SocketSync instance to which it is applied

    Parameters

    • Optional timeOut: Number

    Returns WAKBufferInstance

setEncoding

  • setEncoding(encoding: String): void
  • sets the encoding for data received from the SocketSync to which it is applied

    Parameters

    • encoding: String

    Returns void

setNoDelay

  • setNoDelay(noDelay: Boolean): void
  • disables Nagle's algorithm for the SocketSync to which it is applied

    Parameters

    • noDelay: Boolean

    Returns void

write

  • write(data: String, encoding: String): Boolean
  • write(data: WAKBufferInstance, encoding: String): Boolean
  • writes data to the SocketSync to which it is applied

    Parameters

    • data: String
    • encoding: String

    Returns Boolean

  • writes data to the SocketSync to which it is applied

    Parameters

    Returns Boolean