Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updated documentation
  • Loading branch information
jedi58 committed Jan 21, 2016
1 parent c06f14b commit 22a6d1f
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ A PHP library for sending WOL (Wake-On-LAN) notifications across a network. In o
## Example usage

```PHP
WOL::wake('192.168.1.2', '6A:70:D0:F0:B0:50');
Wol::wake('192.168.1.2', '6A:70:D0:F0:B0:50');
```
The result of this will return the number of bytes sent to the target if successful, otherwise it will return `FALSE`.


## Errors

### Broadcast IP address and MAC address required.
In order to use WOL it is necessary to provide a broadcast IP address and the MAC address of the machine to wake (or turn on).


### Invalid protocol
Only supported protocols may be used; these are:

| Protocol | Description |
| :------: | :---------- |
| AF_INET | IPv4 Internet based protocols. TCP and UDP are common protocols of this protocol family. |
| AF_INET6 | IPv6 Internet based protocols. TCP and UDP are common protocols of this protocol family. |
| AF_UNIX | Local communication protocol family. High efficiency and low overhead make it a great form of IPC (Interprocess Communication). |


### Connection failed
This indicates that the socket could not be created. This could be down to permissions, socket extension not being loaded, etc.


### Unable to set options on socket
Although the socket could be created, this indicates that the settings that are attempting to be applied to the socket are not supported.

0 comments on commit 22a6d1f

Please sign in to comment.