summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/host/mex.host.c
diff options
context:
space:
mode:
authorNicolas Schodet2011-04-19 21:09:44 +0200
committerNicolas Schodet2011-04-19 21:12:09 +0200
commit1a3ffd12000a50845ebeb06b14663304169305c9 (patch)
treef365583ce7bfa855b8fc17bf9675b04bab635f05 /digital/avr/modules/host/mex.host.c
parent3f74740bec4e1e3a9e168d84ae314b1e76705b4f (diff)
digital/avr/modules/host: add mex connection query, refs #157
Diffstat (limited to 'digital/avr/modules/host/mex.host.c')
-rw-r--r--digital/avr/modules/host/mex.host.c7
1 files changed, 7 insertions, 0 deletions
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)