Skip to content

Commit

Permalink
chore(config): improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Apr 18, 2023
1 parent e747a4e commit 6653c23
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
38 changes: 19 additions & 19 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ Generate `size` random bytes.
import { createSocket } from 'socket:dgram'
```
## [`createSocket(options, callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L626)
## [`createSocket(options, callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L623)
Creates a `Socket` instance.
Expand All @@ -433,12 +433,12 @@ Creates a `Socket` instance.
| Not specified | Socket | |
## [`Socket` (extends `EventEmitter`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L632)
## [`Socket` (extends `EventEmitter`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L629)
New instances of dgram.Socket are created using dgram.createSocket().
The new keyword is not to be used to create dgram.Socket instances.
### [`bind(port, address, callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L707)
### [`bind(port, address, callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L704)
External docs: https://nodejs.org/api/dgram.html#socketbindport-address-callback
Expand All @@ -457,7 +457,7 @@ Listen for datagram messages on a named port and optional address
| callback | function | | false | With no parameters. Called when binding is complete. |
### [`connect(port, host, connectListener)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L760)
### [`connect(port, host, connectListener)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L757)
External docs: https://nodejs.org/api/dgram.html#socketconnectport-address-callback
Expand All @@ -479,7 +479,7 @@ Associates the dgram.Socket to a remote address and port. Every message sent
| connectListener | function | | true | Common parameter of socket.connect() methods. Will be added as a listener for the 'connect' event once. |
### [`disconnect()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L795)
### [`disconnect()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L792)
External docs: https://nodejs.org/api/dgram.html#socketdisconnect
Expand All @@ -488,7 +488,7 @@ A synchronous function that disassociates a connected dgram.Socket from
disconnected socket will result in an ERR_SOCKET_DGRAM_NOT_CONNECTED exception.
### [`send(msg, offset, length, port, address, callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L854)
### [`send(msg, offset, length, port, address, callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L851)
External docs: https://nodejs.org/api/dgram.html#socketsendmsg-offset-length-port-address-callback
Expand Down Expand Up @@ -541,7 +541,7 @@ Broadcasts a datagram on the socket. For connectionless sockets, the
| callback | Function | | true | Called when the message has been sent. |
### [`close(callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L934)
### [`close(callback)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L931)
External docs: https://nodejs.org/api/dgram.html#socketclosecallback
Expand All @@ -555,7 +555,7 @@ Close the underlying socket and stop listening for data on it. If a
| callback | function | | true | Called when the connection is completed or on error. |
### [`address()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1000)
### [`address()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L997)
External docs: https://nodejs.org/api/dgram.html#socketaddress
Expand All @@ -573,7 +573,7 @@ Returns an object containing the address information for a socket. For
| socketInfo.family | string | The IP family of the socket |
### [`remoteAddress()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1035)
### [`remoteAddress()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1032)
External docs: https://nodejs.org/api/dgram.html#socketremoteaddress
Expand All @@ -590,7 +590,7 @@ Returns an object containing the address, family, and port of the remote
| socketInfo.family | string | The IP family of the socket |
### [`setRecvBufferSize(size)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1066)
### [`setRecvBufferSize(size)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1063)
External docs: https://nodejs.org/api/dgram.html#socketsetrecvbuffersizesize
Expand All @@ -603,7 +603,7 @@ Sets the SO_RCVBUF socket option. Sets the maximum socket receive buffer in
| size | number | | false | The size of the new receive buffer |
### [`setSendBufferSize(size)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1083)
### [`setSendBufferSize(size)`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1080)
External docs: https://nodejs.org/api/dgram.html#socketsetsendbuffersizesize
Expand All @@ -616,13 +616,13 @@ Sets the SO_SNDBUF socket option. Sets the maximum socket send buffer in
| size | number | | false | The size of the new send buffer |
### [`getRecvBufferSize()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1096)
### [`getRecvBufferSize()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1093)
External docs: https://nodejs.org/api/dgram.html#socketgetrecvbuffersize
### [`getSendBufferSize()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1104)
### [`getSendBufferSize()`](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1101)
External docs: https://nodejs.org/api/dgram.html#socketgetsendbuffersize
Expand All @@ -633,27 +633,27 @@ External docs: https://nodejs.org/api/dgram.html#socketgetsendbuffersize
| Not specified | number | the SO_SNDBUF socket send buffer size in bytes. |
## [`ERR_SOCKET_ALREADY_BOUND` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1175)
## [`ERR_SOCKET_ALREADY_BOUND` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1172)
Thrown when a socket is already bound.
## [`ERR_SOCKET_DGRAM_IS_CONNECTED` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1192)
## [`ERR_SOCKET_DGRAM_IS_CONNECTED` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1189)
Thrown when the socket is already connected.
## [`ERR_SOCKET_DGRAM_NOT_CONNECTED` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1199)
## [`ERR_SOCKET_DGRAM_NOT_CONNECTED` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1196)
Thrown when the socket is not connected.
## [`ERR_SOCKET_DGRAM_NOT_RUNNING` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1207)
## [`ERR_SOCKET_DGRAM_NOT_RUNNING` (extends `SocketError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1204)
Thrown when the socket is not running (not bound or connected).
## [`ERR_SOCKET_BAD_TYPE` (extends `TypeError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1214)
## [`ERR_SOCKET_BAD_TYPE` (extends `TypeError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1211)
Thrown when a bad socket type is used in an argument.
## [`ERR_SOCKET_BAD_PORT` (extends `RangeError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1224)
## [`ERR_SOCKET_BAD_PORT` (extends `RangeError`)](https://github.com/socketsupply/socket/blob/master/api/dgram.js#L1221)
Thrown when a bad port is given.
Expand Down
6 changes: 3 additions & 3 deletions api/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ appstore_icon | | Mac App Store icon
category | | A category in the App Store
cmd | | The command to execute to spawn the "back-end" process.
icon | | The icon to use for identifying your app on MacOS.
sign | | TODO description & value (signing guide: https://sockets.sh/guides/#macos-1)
codesign_identity | | TODO description & value
sign_paths | | TODO description & value
sign | | TODO Signing guide: https://socketsupply.co/guides/#code-signing-certificates
codesign_identity | |
sign_paths | |

## Section `native`

Expand Down
4 changes: 1 addition & 3 deletions src/cli/templates.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1483,13 +1483,11 @@ cmd = ""
; The icon to use for identifying your app on MacOS.
icon = ""
; TODO description & value (signing guide: https://sockets.sh/guides/#macos-1)
; TODO Signing guide: https://socketsupply.co/guides/#code-signing-certificates
sign = ""
; TODO description & value
codesign_identity = ""
; TODO description & value
sign_paths = ""
Expand Down

0 comments on commit 6653c23

Please sign in to comment.