Skip to content

Commit

Permalink
Convert nng_socket_pair.
Browse files Browse the repository at this point in the history
Also some cleanups on the organization of the mdbook.
  • Loading branch information
gdamore committed Oct 12, 2024
1 parent d82509e commit cb7c44c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 72 deletions.
2 changes: 1 addition & 1 deletion docs/man/libnng.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ as a convenience to aid in creating portable applications.
// |xref:nng_mtx_unlock.3supp.adoc[nng_mtx_unlock()]|unlock mutex
|xref:nng_opts_parse.3supp.adoc[nng_opts_parse()]|parse command line options
// |xref:nng_random.3supp.adoc[nng_random()]|get random number
|xref:nng_socket_pair.3supp.adoc[nng_socket_pair()]|create connected pair of BSD sockets
// |xref:nng_socket_pair.3supp.adoc[nng_socket_pair()]|create connected pair of BSD sockets
|xref:nng_thread_create.3supp.adoc[nng_thread_create()]|create thread
|xref:nng_thread_destroy.3supp.adoc[nng_thread_destroy()]|reap thread
|xref:nng_thread_set_name.3supp.adoc[nng_thread_set_name()]|set thread name
Expand Down
52 changes: 0 additions & 52 deletions docs/man/nng_socket_pair.3supp.adoc

This file was deleted.

5 changes: 3 additions & 2 deletions docs/ref/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Summary

- [API](./api.md)
- [API](./api/index.md)

- [Threading Functions](./api/thr/index.md)
- [Threading and Synchronization](./api/thr/index.md)

- [nng_cv](./api/thr/nng_cv.md)
- [nng_mtx](./api/thr/nng_mtx.md)
Expand All @@ -14,6 +14,7 @@
- [nng_id_map](./api/util/nng_id_map.md)
- [nng_msleep](./api/util/nng_msleep.md)
- [nng_random](./api/util/nng_random.md)
- [nng_socket_pair](./api/util/nng_socket_pair.md)
- [nng_strdup](./api/util/nng_strdup.md)
- [nng_strerror](./api/util/nng_strerror.md)
- [nng_version](./api/util/nng_version.md)
Expand Down
4 changes: 0 additions & 4 deletions docs/ref/api.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/ref/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# API

- [Threading and Synchronization](api/thr/)
- [Utility Functions](api/util/)
6 changes: 5 additions & 1 deletion docs/ref/api/thr/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Threading Functions
# Threading and Synchronization

These interfaces are likely to be useful when implementing concurrent designs.
Furthermore, because NNG itself is based on concurrency, the synchronization primitives
are likely to be useful in callback functions and similar situations.

- [nng_cv](nng_cv.md)
- [nng_mtx](nng_mtx.md)
19 changes: 10 additions & 9 deletions docs/ref/api/util/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

This section documents various utility functions that may help
with application portability. These are not fundamental to NNG
or Scalability Protocols, but we find them useful for a variety
or Scalability Protocols, but they are likely useful for a variety
of other uses.

- [nng_alloc](nng_alloc.md)
- [nng_clock](nng_clock.md)
- [nng_id_map](nng_id_map.md)
- [nng_msleep](nng_msleep.md)
- [nng_random](nng_random.md)
- [nng_strdup](nng_strdup.md)
- [nng_strerror](nng_strerror.md)
- [nng_version](nng_version.md)
- [nng_alloc](nng_alloc.md) --- allocate memory
- [nng_clock](nng_clock.md) --- get time
- [nng_id_map](nng_id_map.md) --- identifier based mapping table
- [nng_msleep](nng_msleep.md) --- sleep milliseconds
- [nng_random](nng_random.md) --- get random number
- [nng_socket_pair](nng_socket_pair.md) --- create a connected pair of BSD sockets
- [nng_strdup](nng_strdup.md) --- duplicate string
- [nng_strerror](nng_strerror.md) --- return an error description
- [nng_version](nng_version.md) --- report library version
6 changes: 3 additions & 3 deletions docs/ref/tran/socket.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

The {{i:_socket_ transport}} supports communication between
peers across arbitrary BSD sockets, such as those that are
created with [`nng_socket_pair()`][nng_socket_pair].
created with [`nng_socket_pair`][nng_socket_pair].

This transport only supports [listeners][listener],
using [`nng_listener_create()`][nng_listener_create].
using [`nng_listener_create`][nng_listener_create].

> [!NOTE]
> Attempts to create [dialers][dialer] using this transport will result in `NNG_ENOTSUP`.
Expand Down Expand Up @@ -63,7 +63,7 @@ Additionally, the following options may be supported on pipes when the platform
[dialer]: [TODO.md]
[nng_sockaddr]: [TODO.md]
[nng_listener_create]: [TODO.md]
[nng_socket_pair]: [TODO.md]
[nng_socket_pair]: ../../api/util/nng_socket_pair.md
[NNG_OPT_LOCADDR]: [TODO.md]
[NNG_OPT_REMADDR]: [TODO.md]
[NNG_OPT_URL]: [TODO.md]
Expand Down

0 comments on commit cb7c44c

Please sign in to comment.