aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-03-29 13:20:42 -0700
committerGarrett D'Amore <garrett@damore.org>2017-03-29 13:22:24 -0700
commit84990c6ecb35ef322b74b8cc9e74ad5964b66ee5 (patch)
treeb545f8bc47828e9398d053d31e7676e2554cbf3c /src/transport
parent374f93a18edca2e0656c337a5b54927169ec31fa (diff)
downloadnng-84990c6ecb35ef322b74b8cc9e74ad5964b66ee5.tar.gz
nng-84990c6ecb35ef322b74b8cc9e74ad5964b66ee5.tar.bz2
nng-84990c6ecb35ef322b74b8cc9e74ad5964b66ee5.zip
Clean up some dead code.
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/tcp/tcp.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c
index f220e49e..1cf64768 100644
--- a/src/transport/tcp/tcp.c
+++ b/src/transport/tcp/tcp.c
@@ -259,72 +259,6 @@ nni_tcp_pipe_aio_recv(void *arg, nni_aio *aio)
}
-static int
-nni_tcp_pipe_send(void *arg, nni_msg *msg)
-{
-#if 0
- nni_tcp_pipe *pipe = arg;
- uint64_t len;
- uint8_t buf[sizeof (len)];
- nni_iov iov[3];
- int rv;
-
- iov[0].iov_buf = buf;
- iov[0].iov_len = sizeof (buf);
- iov[1].iov_buf = nni_msg_header(msg);
- iov[1].iov_len = nni_msg_header_len(msg);
- iov[2].iov_buf = nni_msg_body(msg);
- iov[2].iov_len = nni_msg_len(msg);
-
- len = (uint64_t) iov[1].iov_len + (uint64_t) iov[2].iov_len;
- NNI_PUT64(buf, len);
-
- if ((rv = nni_plat_tcp_send(pipe->tsp, iov, 3)) == 0) {
- nni_msg_free(msg);
- }
- return (rv);
-
-#endif
- return (NNG_EINVAL);
-}
-
-
-static int
-nni_tcp_pipe_recv(void *arg, nni_msg **msgp)
-{
- nni_tcp_pipe *pipe = arg;
- nni_msg *msg;
- uint64_t len;
- uint8_t buf[sizeof (len)];
- nni_iov iov[1];
- int rv;
-
- iov[0].iov_buf = buf;
- iov[0].iov_len = sizeof (buf);
- if ((rv = nni_plat_tcp_recv(pipe->tsp, iov, 1)) != 0) {
- return (rv);
- }
- NNI_GET64(buf, len);
- if (len > pipe->rcvmax) {
- return (NNG_EMSGSIZE);
- }
-
- if ((rv = nng_msg_alloc(&msg, (size_t) len)) != 0) {
- return (rv);
- }
-
- iov[0].iov_len = nng_msg_len(msg);
- iov[0].iov_buf = nng_msg_body(msg);
-
- if ((rv = nni_plat_tcp_recv(pipe->tsp, iov, 1)) == 0) {
- *msgp = msg;
- } else {
- nni_msg_free(msg);
- }
- return (rv);
-}
-
-
static uint16_t
nni_tcp_pipe_peer(void *arg)
{