From 1a3ffd12000a50845ebeb06b14663304169305c9 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 19 Apr 2011 21:09:44 +0200 Subject: digital/avr/modules/host: add mex connection query, refs #157 --- digital/avr/modules/host/mex.host.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'digital/avr/modules/host/mex.host.c') diff --git a/digital/avr/modules/host/mex.host.c b/digital/avr/modules/host/mex.host.c index 8921cadd..349ee3b6 100644 --- a/digital/avr/modules/host/mex.host.c +++ b/digital/avr/modules/host/mex.host.c @@ -395,6 +395,13 @@ mex_node_connect (void) } } +/** Query connection status, returns 0 if not connected. */ +int +mex_node_connected (void) +{ + return mex_node_global.socket != -1; +} + /** Close connection. */ void mex_node_close (void) -- cgit v1.2.3