class Socket extends Object with StObject with SendHandle

Annotations
@JSType() @JSImport("net", "Socket") @native()
Source
Socket.scala
Linear Supertypes
SendHandle, StObject, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Socket
  2. SendHandle
  3. StObject
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Socket(options: SocketConstructorOpts)
  2. new Socket()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addListener(event: scala.Predef.String, listener: Function1[Any, Unit]): Socket.this.type

    events.EventEmitter

    events.EventEmitter

    1. close 2. connect 3. data 4. drain 5. end 6. error 7. lookup 8. timeout
  5. def addListener_close(event: close, listener: Function1[Boolean, Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  6. def addListener_connect(event: connect, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  7. def addListener_data(event: data, listener: Function1[Buffer, Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  8. def addListener_drain(event: drain, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  9. def addListener_end(event: end, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  10. def addListener_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  11. def addListener_lookup(event: lookup, listener: Function4[Error, scala.Predef.String, |[scala.Predef.String, Double], scala.Predef.String, Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  12. def addListener_timeout(event: timeout, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("addListener")
  13. def address(): |[AddressInfo, Object]
  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. val bytesRead: Double
  16. val bytesWritten: Double
  17. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  18. def connect(port: Double, host: scala.Predef.String, connectionListener: Function0[Unit]): Socket.this.type
  19. def connect(port: Double, host: scala.Predef.String): Socket.this.type
  20. def connect(port: Double, connectionListener: Function0[Unit]): Socket.this.type
  21. def connect(port: Double): Socket.this.type
  22. def connect(path: scala.Predef.String, connectionListener: Function0[Unit]): Socket.this.type
  23. def connect(path: scala.Predef.String): Socket.this.type
  24. def connect(options: SocketConnectOpts, connectionListener: Function0[Unit]): Socket.this.type
  25. def connect(options: SocketConnectOpts): Socket.this.type
  26. val connecting: Boolean
  27. val destroyed: Boolean
  28. def emit(event: Symbol, args: Any*): Boolean
  29. def emit(event: scala.Predef.String, args: Any*): Boolean
  30. def emit_close(event: close, had_error: Boolean): Boolean
    Annotations
    @JSName("emit")
  31. def emit_connect(event: connect): Boolean
    Annotations
    @JSName("emit")
  32. def emit_data(event: data, data: Buffer): Boolean
    Annotations
    @JSName("emit")
  33. def emit_drain(event: drain): Boolean
    Annotations
    @JSName("emit")
  34. def emit_end(event: end): Boolean
    Annotations
    @JSName("emit")
  35. def emit_error(event: error, err: Error): Boolean
    Annotations
    @JSName("emit")
  36. def emit_lookup(event: lookup, err: Error, address: scala.Predef.String, family: Double, host: scala.Predef.String): Boolean
    Annotations
    @JSName("emit")
  37. def emit_lookup(event: lookup, err: Error, address: scala.Predef.String, family: scala.Predef.String, host: scala.Predef.String): Boolean
    Annotations
    @JSName("emit")
  38. def emit_timeout(event: timeout): Boolean
    Annotations
    @JSName("emit")
  39. def end(str: Uint8Array, encoding: Unit, cb: Function0[Unit]): Unit
  40. def end(str: Uint8Array, encoding: BufferEncoding, cb: Function0[Unit]): Unit
  41. def end(str: Uint8Array, encoding: BufferEncoding): Unit
  42. def end(str: scala.Predef.String, encoding: Unit, cb: Function0[Unit]): Unit
  43. def end(str: scala.Predef.String, encoding: BufferEncoding, cb: Function0[Unit]): Unit
  44. def end(str: scala.Predef.String, encoding: BufferEncoding): Unit
  45. def end(cb: Function0[Unit]): Unit
  46. def end(buffer: Uint8Array, cb: Function0[Unit]): Unit
  47. def end(buffer: Uint8Array): Unit
  48. def end(buffer: scala.Predef.String, cb: Function0[Unit]): Unit
  49. def end(buffer: scala.Predef.String): Unit
  50. def end(): Unit
  51. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  52. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  53. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  54. def hasOwnProperty(v: scala.Predef.String): Boolean
    Definition Classes
    Object
  55. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  56. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  57. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  58. val localAddress: scala.Predef.String
  59. val localPort: Double
  60. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  61. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  62. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  63. def on(event: scala.Predef.String, listener: Function1[Any, Unit]): Socket.this.type
  64. def on_close(event: close, listener: Function1[Boolean, Unit]): Socket.this.type
    Annotations
    @JSName("on")
  65. def on_connect(event: connect, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("on")
  66. def on_data(event: data, listener: Function1[Buffer, Unit]): Socket.this.type
    Annotations
    @JSName("on")
  67. def on_drain(event: drain, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("on")
  68. def on_end(event: end, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("on")
  69. def on_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
    Annotations
    @JSName("on")
  70. def on_lookup(event: lookup, listener: Function4[Error, scala.Predef.String, |[scala.Predef.String, Double], scala.Predef.String, Unit]): Socket.this.type
    Annotations
    @JSName("on")
  71. def on_timeout(event: timeout, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("on")
  72. def once(event: scala.Predef.String, listener: Function1[Any, Unit]): Socket.this.type
  73. def once_close(event: close, listener: Function1[Boolean, Unit]): Socket.this.type
    Annotations
    @JSName("once")
  74. def once_connect(event: connect, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("once")
  75. def once_data(event: data, listener: Function1[Buffer, Unit]): Socket.this.type
    Annotations
    @JSName("once")
  76. def once_drain(event: drain, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("once")
  77. def once_end(event: end, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("once")
  78. def once_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
    Annotations
    @JSName("once")
  79. def once_lookup(event: lookup, listener: Function4[Error, scala.Predef.String, |[scala.Predef.String, Double], scala.Predef.String, Unit]): Socket.this.type
    Annotations
    @JSName("once")
  80. def once_timeout(event: timeout, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("once")
  81. def pause(): Socket.this.type
  82. def prependListener(event: scala.Predef.String, listener: Function1[Any, Unit]): Socket.this.type
  83. def prependListener_close(event: close, listener: Function1[Boolean, Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  84. def prependListener_connect(event: connect, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  85. def prependListener_data(event: data, listener: Function1[Buffer, Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  86. def prependListener_drain(event: drain, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  87. def prependListener_end(event: end, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  88. def prependListener_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  89. def prependListener_lookup(event: lookup, listener: Function4[Error, scala.Predef.String, |[scala.Predef.String, Double], scala.Predef.String, Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  90. def prependListener_timeout(event: timeout, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependListener")
  91. def prependOnceListener(event: scala.Predef.String, listener: Function1[Any, Unit]): Socket.this.type
  92. def prependOnceListener_close(event: close, listener: Function1[Boolean, Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  93. def prependOnceListener_connect(event: connect, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  94. def prependOnceListener_data(event: data, listener: Function1[Buffer, Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  95. def prependOnceListener_drain(event: drain, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  96. def prependOnceListener_end(event: end, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  97. def prependOnceListener_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  98. def prependOnceListener_lookup(event: lookup, listener: Function4[Error, scala.Predef.String, |[scala.Predef.String, Double], scala.Predef.String, Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  99. def prependOnceListener_timeout(event: timeout, listener: Function0[Unit]): Socket.this.type
    Annotations
    @JSName("prependOnceListener")
  100. def propertyIsEnumerable(v: scala.Predef.String): Boolean
    Definition Classes
    Object
  101. def ref(): Socket.this.type
  102. val remoteAddress: UndefOr[scala.Predef.String]
  103. val remoteFamily: UndefOr[scala.Predef.String]
  104. val remotePort: UndefOr[Double]
  105. def resume(): Socket.this.type
  106. def setEncoding(encoding: BufferEncoding): Socket.this.type
  107. def setEncoding(): Socket.this.type
  108. def setKeepAlive(enable: Unit, initialDelay: Double): Socket.this.type
  109. def setKeepAlive(enable: Boolean, initialDelay: Double): Socket.this.type
  110. def setKeepAlive(enable: Boolean): Socket.this.type
  111. def setKeepAlive(): Socket.this.type
  112. def setNoDelay(noDelay: Boolean): Socket.this.type
  113. def setNoDelay(): Socket.this.type
  114. def setTimeout(timeout: Double, callback: Function0[Unit]): Socket.this.type
  115. def setTimeout(timeout: Double): Socket.this.type
  116. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  117. def toLocaleString(): scala.Predef.String
    Definition Classes
    Object
  118. def toString(): java.lang.String
    Definition Classes
    AnyRef → Any
  119. def unref(): Socket.this.type
  120. def valueOf(): Any
    Definition Classes
    Object
  121. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  122. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  123. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  124. def write(str: Uint8Array, encoding: Unit, cb: Function1[UndefOr[Error], Unit]): Boolean
  125. def write(str: Uint8Array, encoding: BufferEncoding, cb: Function1[UndefOr[Error], Unit]): Boolean
  126. def write(str: Uint8Array, encoding: BufferEncoding): Boolean
  127. def write(str: scala.Predef.String, encoding: Unit, cb: Function1[UndefOr[Error], Unit]): Boolean
  128. def write(str: scala.Predef.String, encoding: BufferEncoding, cb: Function1[UndefOr[Error], Unit]): Boolean
  129. def write(str: scala.Predef.String, encoding: BufferEncoding): Boolean
  130. def write(buffer: Uint8Array, cb: Function1[UndefOr[Error], Unit]): Boolean
  131. def write(buffer: Uint8Array): Boolean
  132. def write(buffer: scala.Predef.String, cb: Function1[UndefOr[Error], Unit]): Boolean
  133. def write(buffer: scala.Predef.String): Boolean

Deprecated Value Members

  1. val bufferSize: Double

    Deprecated

    since v14.6.0 - Use writableLength instead.

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from SendHandle

Inherited from StObject

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped