From f723fa9655e1e7fadc1a15b94b66de674ab9fe17 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 13 Mar 2019 00:50:48 -0700 Subject: fixes #815 Eliminate socket filters on message queues This also eliminates the enforcement of NNG_OPT_RECVMAXSZ for inproc, which never really made much sense. This helps inproc go faster. While here, also clean up the entry point for protocols to support a drain option, since we don't use that anywhere. --- src/core/msgqueue.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/core/msgqueue.h') diff --git a/src/core/msgqueue.h b/src/core/msgqueue.h index 44f9e765..2c43e540 100644 --- a/src/core/msgqueue.h +++ b/src/core/msgqueue.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2019 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -49,19 +49,6 @@ extern int nni_msgq_tryput(nni_msgq *, nni_msg *); // Readers (nni_msgq_put*) are unaffected. extern void nni_msgq_set_get_error(nni_msgq *, int); -// nni_msgq_filter is a callback function used to filter messages. -// The function is called on entry (put) or exit (get). The void -// argument is an opaque pointer supplied with the function at registration -// time. The primary use for these functions is to support the protocol -// socket needs. -typedef nni_msg *(*nni_msgq_filter)(void *, nni_msg *); - -// nni_msgq_set_filter sets the filter on the queue. Messages -// are filtered through this just before they are returned via the get -// functions. If the filter returns NULL, then the message is silently -// discarded instead, and any get waiters remain waiting. -extern void nni_msgq_set_filter(nni_msgq *, nni_msgq_filter, void *); - // nni_msgq_close closes the queue. After this all operates on the // message queue will return NNG_ECLOSED. Messages inside the queue // are freed. Unlike closing a go channel, this operation is idempotent. -- cgit v1.2.3-70-g09d2