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