Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit b22d2ee

Browse files
authored
Merge pull request #269 from exoego/dgram-nodejs-v14
[UDP/Datagram] Add addSourceSpecificMemberShip/dropSourceSpecificMemberShip
2 parents d62c257 + 800d757 commit b22d2ee

File tree

1 file changed

+20
-10
lines changed
  • app/nodejs-v14/src/main/scala/io/scalajs/nodejs/dgram

1 file changed

+20
-10
lines changed

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/dgram/Socket.scala

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ class Socket private[this] () extends IEventEmitter {
3131
def addMembership(multicastAddress: String, multicastInterface: String): Unit = js.native
3232
def addMembership(multicastAddress: String): Unit = js.native
3333

34+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
35+
def addSourceSpecificMembership(sourceAddress: String, groupAddress: String, multicastInterface: String): Unit =
36+
js.native
37+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
38+
def addSourceSpecificMembership(sourceAddress: String, groupAddress: String): Unit = js.native
39+
3440
/**
3541
* Returns an object containing the address information for a socket. For UDP sockets,
3642
* this object will contain address, family and port properties.
@@ -71,23 +77,27 @@ class Socket private[this] () extends IEventEmitter {
7177
def close(callback: js.Function): Unit = js.native
7278
def close(): Unit = js.native
7379

74-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def connect(port: Int,
75-
address: String,
76-
callback: js.Function0[Any]
77-
): Unit = js.native
78-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def connect(port: Int, address: String): Unit =
79-
js.native
80-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def connect(port: Int,
81-
callback: js.Function0[Any]
82-
): Unit = js.native
83-
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def connect(port: Int): Unit = js.native
80+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
81+
def connect(port: Int, address: String, callback: js.Function0[Any]): Unit = js.native
82+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
83+
def connect(port: Int, address: String): Unit = js.native
84+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
85+
def connect(port: Int, callback: js.Function0[Any]): Unit = js.native
86+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
87+
def connect(port: Int): Unit = js.native
8488

8589
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
8690
def disconnect(): Unit = js.native
8791

8892
def dropMembership(multicastAddress: String, multicastInterface: String): Unit = js.native
8993
def dropMembership(multicastAddress: String): Unit = js.native
9094

95+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
96+
def dropSourceSpecificMembership(sourceAddress: String, groupAddress: String, multicastInterface: String): Unit =
97+
js.native
98+
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
99+
def dropSourceSpecificMembership(sourceAddress: String, groupAddress: String): Unit = js.native
100+
91101
def getRecvBufferSize(): Int = js.native
92102
def getSendBufferSize(): Int = js.native
93103

0 commit comments

Comments
 (0)