class Socket extends Object with StObject
- Annotations
- @JSType() @JSImport("dgram", "Socket") @native()
- Source
- dgramMod.scala
- Alphabetic
- By Inheritance
- Socket
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Socket(options: EventEmitterOptions)
- new Socket()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addListener(event: java.lang.String, listener: Function1[Any, Unit]): Socket.this.type
events.EventEmitter 1.
events.EventEmitter 1. close 2. connect 3. error 4. listening 5. message
- def addListener_close(event: close, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("addListener")
- def addListener_connect(event: connect, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("addListener")
- def addListener_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
- Annotations
- @JSName("addListener")
- def addListener_listening(event: listening, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("addListener")
- def addListener_message(event: message, listener: Function2[Buffer, RemoteInfo, Unit]): Socket.this.type
- Annotations
- @JSName("addListener")
- def addMembership(multicastAddress: java.lang.String, multicastInterface: java.lang.String): Unit
- def addMembership(multicastAddress: java.lang.String): Unit
- def addSourceSpecificMembership(sourceAddress: java.lang.String, groupAddress: java.lang.String, multicastInterface: java.lang.String): Unit
- def addSourceSpecificMembership(sourceAddress: java.lang.String, groupAddress: java.lang.String): Unit
Tells the kernel to join a source-specific multicast channel at the given
sourceAddressandgroupAddress, using themulticastInterfacewith theIP_ADD_SOURCE_MEMBERSHIPsocket option.Tells the kernel to join a source-specific multicast channel at the given
sourceAddressandgroupAddress, using themulticastInterfacewith theIP_ADD_SOURCE_MEMBERSHIPsocket option. If themulticastInterfaceargument is not specified, the operating system will choose one interface and will add membership to it. To add membership to every available interface, callsocket.addSourceSpecificMembership()multiple times, once per interface. - def address(): AddressInfo
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bind(port: Unit, callback: Function0[Unit]): Unit
- def bind(port: Unit, address: Unit, callback: Function0[Unit]): Unit
- def bind(port: Unit, address: java.lang.String, callback: Function0[Unit]): Unit
- def bind(port: Unit, address: java.lang.String): Unit
- def bind(port: Double, callback: Function0[Unit]): Unit
- def bind(port: Double, address: Unit, callback: Function0[Unit]): Unit
- def bind(port: Double, address: java.lang.String, callback: Function0[Unit]): Unit
- def bind(port: Double, address: java.lang.String): Unit
- def bind(port: Double): Unit
- def bind(options: BindOptions, callback: Function0[Unit]): Unit
- def bind(options: BindOptions): Unit
- def bind(callback: Function0[Unit]): Unit
- def bind(): Unit
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def close(callback: Function0[Unit]): Unit
- def close(): Unit
- def connect(port: Double, callback: Function0[Unit]): Unit
- def connect(port: Double, address: Unit, callback: Function0[Unit]): Unit
- def connect(port: Double, address: java.lang.String, callback: Function0[Unit]): Unit
- def connect(port: Double, address: java.lang.String): Unit
- def connect(port: Double): Unit
- def disconnect(): Unit
- def dropMembership(multicastAddress: java.lang.String, multicastInterface: java.lang.String): Unit
- def dropMembership(multicastAddress: java.lang.String): Unit
- def dropSourceSpecificMembership(sourceAddress: java.lang.String, groupAddress: java.lang.String, multicastInterface: java.lang.String): Unit
- def dropSourceSpecificMembership(sourceAddress: java.lang.String, groupAddress: java.lang.String): Unit
Instructs the kernel to leave a source-specific multicast channel at the given
sourceAddressandgroupAddressusing theIP_DROP_SOURCE_MEMBERSHIPsocket option.Instructs the kernel to leave a source-specific multicast channel at the given
sourceAddressandgroupAddressusing theIP_DROP_SOURCE_MEMBERSHIPsocket option. This method is automatically called by the kernel when the socket is closed or the process terminates, so most apps will never have reason to call this.If
multicastInterfaceis not specified, the operating system will attempt to drop membership on all valid interfaces. - def emit(event: Symbol, args: Any*): Boolean
- def emit(event: java.lang.String, args: Any*): Boolean
- def emit_close(event: close): Boolean
- Annotations
- @JSName("emit")
- def emit_connect(event: connect): Boolean
- Annotations
- @JSName("emit")
- def emit_error(event: error, err: Error): Boolean
- Annotations
- @JSName("emit")
- def emit_listening(event: listening): Boolean
- Annotations
- @JSName("emit")
- def emit_message(event: message, msg: Buffer, rinfo: RemoteInfo): Boolean
- Annotations
- @JSName("emit")
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getRecvBufferSize(): Double
- def getSendBufferSize(): Double
- def hasOwnProperty(v: scala.Predef.String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def on(event: java.lang.String, listener: Function1[Any, Unit]): Socket.this.type
- def on_close(event: close, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("on")
- def on_connect(event: connect, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("on")
- def on_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
- Annotations
- @JSName("on")
- def on_listening(event: listening, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("on")
- def on_message(event: message, listener: Function2[Buffer, RemoteInfo, Unit]): Socket.this.type
- Annotations
- @JSName("on")
- def once(event: java.lang.String, listener: Function1[Any, Unit]): Socket.this.type
- def once_close(event: close, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("once")
- def once_connect(event: connect, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("once")
- def once_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
- Annotations
- @JSName("once")
- def once_listening(event: listening, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("once")
- def once_message(event: message, listener: Function2[Buffer, RemoteInfo, Unit]): Socket.this.type
- Annotations
- @JSName("once")
- def prependListener(event: java.lang.String, listener: Function1[Any, Unit]): Socket.this.type
- def prependListener_close(event: close, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("prependListener")
- def prependListener_connect(event: connect, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("prependListener")
- def prependListener_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
- Annotations
- @JSName("prependListener")
- def prependListener_listening(event: listening, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("prependListener")
- def prependListener_message(event: message, listener: Function2[Buffer, RemoteInfo, Unit]): Socket.this.type
- Annotations
- @JSName("prependListener")
- def prependOnceListener(event: java.lang.String, listener: Function1[Any, Unit]): Socket.this.type
- def prependOnceListener_close(event: close, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("prependOnceListener")
- def prependOnceListener_connect(event: connect, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("prependOnceListener")
- def prependOnceListener_error(event: error, listener: Function1[Error, Unit]): Socket.this.type
- Annotations
- @JSName("prependOnceListener")
- def prependOnceListener_listening(event: listening, listener: Function0[Unit]): Socket.this.type
- Annotations
- @JSName("prependOnceListener")
- def prependOnceListener_message(event: message, listener: Function2[Buffer, RemoteInfo, Unit]): Socket.this.type
- Annotations
- @JSName("prependOnceListener")
- def propertyIsEnumerable(v: scala.Predef.String): Boolean
- Definition Classes
- Object
- def ref(): Socket.this.type
- def remoteAddress(): AddressInfo
- def send(msg: Uint8Array, port: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, port: Unit, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, port: Unit, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, port: Unit, address: java.lang.String): Unit
- def send(msg: Uint8Array, port: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, port: Double, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, port: Double, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, port: Double, address: java.lang.String): Unit
- def send(msg: Uint8Array, port: Double): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Unit, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Unit, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Unit, address: java.lang.String): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Double, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Double, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Double, address: java.lang.String): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, port: Double): Unit
- def send(msg: Uint8Array, offset: Double, length: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array, offset: Double, length: Double): Unit
- def send(msg: Uint8Array, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Uint8Array): Unit
- def send(msg: Array[Any], port: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any], port: Unit, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any], port: Unit, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any], port: Unit, address: java.lang.String): Unit
- def send(msg: Array[Any], port: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any], port: Double, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any], port: Double, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any], port: Double, address: java.lang.String): Unit
- def send(msg: Array[Any], port: Double): Unit
- def send(msg: Array[Any], callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: Array[Any]): Unit
- def send(msg: java.lang.String, port: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, port: Unit, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, port: Unit, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, port: Unit, address: java.lang.String): Unit
- def send(msg: java.lang.String, port: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, port: Double, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, port: Double, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, port: Double, address: java.lang.String): Unit
- def send(msg: java.lang.String, port: Double): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Unit, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Unit, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Unit, address: java.lang.String): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Double, address: Unit, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Double, address: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Double, address: java.lang.String): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, port: Double): Unit
- def send(msg: java.lang.String, offset: Double, length: Double, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String, offset: Double, length: Double): Unit
- def send(msg: java.lang.String, callback: Function2[|[Error, Null], Double, Unit]): Unit
- def send(msg: java.lang.String): Unit
- def setBroadcast(flag: Boolean): Unit
- def setMulticastInterface(multicastInterface: java.lang.String): Unit
- def setMulticastLoopback(flag: Boolean): Unit
- def setMulticastTTL(ttl: Double): Unit
- def setRecvBufferSize(size: Double): Unit
- def setSendBufferSize(size: Double): Unit
- def setTTL(ttl: Double): Unit
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): scala.Predef.String
- Definition Classes
- Object
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- def unref(): Socket.this.type
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated