Skip to content

Commit 6501cfe

Browse files
authored
Add udp server feature to str2str (#48)
1 parent b6c64bf commit 6501cfe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/str2str/str2str.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ static const char *help[] = {
7373
" stream path",
7474
" serial : serial://port[:brate[:bsize[:parity[:stopb[:fctr]]]]]",
7575
" tcp server : tcpsvr://:port",
76+
" udp server : udpsvr://addr:port",
7677
" tcp client : tcpcli://addr[:port]",
7778
" ntrip client : ntrip://[user[:passwd]@]addr[:port][/mntpnt]",
7879
" ntrip server : ntrips://[:passwd@]addr[:port]/mntpnt[:str] (only out)",
@@ -204,6 +205,8 @@ static int decodepath(const char *path, int *type, char *strpath, int *fmt) {
204205
*type = STR_SERIAL;
205206
else if (!strncmp(path, "tcpsvr", 6))
206207
*type = STR_TCPSVR;
208+
else if (!strncmp(path, "udpsvr", 6))
209+
*type = STR_UDPSVR;
207210
else if (!strncmp(path, "tcpcli", 6))
208211
*type = STR_TCPCLI;
209212
else if (!strncmp(path, "ntripc_s", 8))

0 commit comments

Comments
 (0)