Wake on LAN for node.js
=======================

This is a fork of (node_wake_on_lan) [https://github.com/agnat/node_wake_on_lan] by (agnat)[https://github.com/agnat]. Credits go to him.

Install via `npm install node-wol`

Usage
-----
```js
var wol = require('node-wol');

wol.wake('20:DE:20:DE:20:DE');

wol.wake('20:DE:20:DE:20:DE', function(error) {
  if(error) {
    // handle error
    return;
  }
});

var magicPacket = wol.createMagicPacket('20:DE:20:DE:20:DE');
```

Optional options
-------
* address (optional ip address)
* port (optional port; default is 9)

```js
wol.wake('20:DE:20:DE:20:DE', {
  address: '192.168.10.12',
  port: 7
}, function(error) {
  if(error) {
    // handle error
    return;
  }
});
```

# Project Modified by Domotz

This software is based on the original project [node-wol](https://github.com/sudo-systems/node-wol) released under the GPL-2.0 license.

## Changes
- [2024-11-27]: Close socket after sending WOL packet, from [PR-2](https://github.com/sudo-systems/node-wol/pull/2)

## License
This project is distributed under the GPL-2.0 license. Refer to the `LICENSE` file for more details.
