diff --git a/README.md b/README.md index d27e640..836d4e7 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,24 @@ other outstanding ping requests. }); } +## session.getSocket () + +The `getSocket()` method returns the underlying `Socket` instance used by +the session. Refer to the [raw-socket][raw-socket] module for documentation +related to the `Socket` class. + +In the following example the network interface from which to send ICMP messages +is set: + + var raw = require("raw-socket") // Required for access to constants + + var level = raw.SocketLevel.SOL_SOCKET + var option = raw.SocketOption.SO_BINDTODEVICE + + var iface = Buffer.from("eth0") + + session.getSocket().setOption(level, option, iface, iface.length) + ## session.pingHost (target, callback) The `pingHost()` method sends a ping request to a remote host. @@ -478,6 +496,10 @@ Bug reports should be sent to . * The `_expandConstantObject()` function was declaring variables with global scope +## Version 1.2.1 - 14/07/2017 + + * Document the `Socket.getSocket()` method + # Roadmap Suggestions and requirements should be sent to . diff --git a/package.json b/package.json index 6259636..561e625 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "net-ping", - "version": "1.2.0", + "version": "1.2.1", "description": "Ping and trace route to many hosts at once.", "main": "index.js", "directories": {