(ipv4, ipv6)
| 176 | |
| 177 | |
| 178 | setLocalAddress(ipv4, ipv6) { |
| 179 | validateString(ipv4, 'ipv4'); |
| 180 | |
| 181 | if (ipv6 !== undefined) { |
| 182 | validateString(ipv6, 'ipv6'); |
| 183 | } |
| 184 | |
| 185 | this._handle.setLocalAddress(ipv4, ipv6); |
| 186 | |
| 187 | if (isBuildingSnapshot()) { |
| 188 | this[kSnapshotStates].localAddress = { ipv4, ipv6 }; |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | // TODO(joyeecheung): consider exposing this if custom DNS resolvers |
| 193 | // end up being useful for snapshot users. |
no test coverage detected