summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xtrans.c16
-rw-r--r--Xtrans.h4
2 files changed, 20 insertions, 0 deletions
diff --git a/Xtrans.c b/Xtrans.c
index 225f4c8..d9e32d0 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -802,6 +802,22 @@ TRANS(NoListen) (const char * protocol)
}
int
+TRANS(IsListening) (const char * protocol)
+{
+ Xtransport *trans;
+
+ if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+ {
+ prmsg (1,"TransIsListening: unable to find transport: %s\n",
+ protocol);
+
+ return 0;
+ }
+
+ return !(trans->flags & TRANS_NOLISTEN);
+}
+
+int
TRANS(ResetListener) (XtransConnInfo ciptr)
{
diff --git a/Xtrans.h b/Xtrans.h
index 1754720..5807b67 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -311,6 +311,10 @@ int TRANS(NoListen) (
const char* /* protocol*/
);
+int TRANS(IsListening) (
+ const char* /* protocol*/
+);
+
int TRANS(ResetListener)(
XtransConnInfo /* ciptr */
);