Debian Codegraph @

src/resolver.h

raw
1 /*
2 resolver.c: TCP network stuff, for IPv4 and IPv6
3
4 copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1
5 see COPYING and AUTHORS files in distribution or http://mpg123.org
6 initially written Thomas Orgis (based on httpget.c)
7 */
8
9 #ifndef MPG123_RESOLVER_H
10 #define MPG123_RESOLVER_H
11
12 #include "mpg123app.h"
13 /*
14 Split an URL into parts of user:password, hostname, port, path on host.
15 There is no name resolution going on here, also no numeric conversion.
16 The URL string is supposed to be stripped of all \r and \n.
17 Return code 1 (TRUE) is fine, 0 (FALSE) is bad.
18 */
19 int split_url(mpg123_string *url, mpg123_string *auth, mpg123_string *host, mpg123_string *port, mpg123_string *path);
20 /*
21 Open a connection to specified server and port.
22 The arguments are plain strings (hostname or IP, port number as string); any network specific data types are hidden.
23 */
24 int open_connection(mpg123_string *host, mpg123_string *port);
25
26 #endif