aboutsummaryrefslogtreecommitdiff
path: root/src/core/socket.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-23 11:04:57 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-23 11:05:36 -0800
commita12baf41fb17ef51a8b1d0c82e31113454c5beae (patch)
tree9e9368ae235a08ff4f9a1738d9e9148f567442e1 /src/core/socket.h
parent6f5f10fd56da48aa7d95f80e5f3f03c4097f8132 (diff)
downloadnng-a12baf41fb17ef51a8b1d0c82e31113454c5beae.tar.gz
nng-a12baf41fb17ef51a8b1d0c82e31113454c5beae.tar.bz2
nng-a12baf41fb17ef51a8b1d0c82e31113454c5beae.zip
nng_setopt works (rcvtimeout, etc.) External API adjustments.
The external API now uses simpler names for various things, notably we ditch the whole nng_socket_xx prefix. For example, intstead of nng_socket_create, we just use nng_open(). There are no more nng_socket_xxx calls.
Diffstat (limited to 'src/core/socket.h')
-rw-r--r--src/core/socket.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/socket.h b/src/core/socket.h
index 4fa59355..a31e09e5 100644
--- a/src/core/socket.h
+++ b/src/core/socket.h
@@ -25,7 +25,11 @@ struct nng_socket {
void * s_data; // Protocol private
// XXX: options
- nni_duration s_linger;
+ nni_duration s_linger; // linger time
+ nni_duration s_sndtimeo; // send timeout
+ nni_duration s_rcvtimeo; // receive timeout
+ nni_duration s_reconn; // reconnect time
+ nni_duration s_reconnmax; // max reconnect time
nni_list s_eps; // active endpoints
nni_list s_pipes; // pipes for this socket
@@ -45,6 +49,7 @@ extern void nni_socket_rem_pipe(nni_socket *, nni_pipe *);
extern uint16_t nni_socket_proto(nni_socket *);
extern int nni_socket_setopt(nni_socket *, int, const void *, size_t);
extern int nni_socket_getopt(nni_socket *, int, void *, size_t *);
-extern int nni_socket_recvmsg(nni_socket *, nni_msg **, int);
+extern int nni_socket_recvmsg(nni_socket *, nni_msg **, nni_time);
+extern int nni_socket_sendmsg(nni_socket *, nni_msg *, nni_time);
#endif // CORE_SOCKET_H