Mercurial > mplayer.hg
annotate stream/tcp.h @ 26064:e173fde700da
Replace silly check for config.h inclusion, just include it.
author | diego |
---|---|
date | Sun, 24 Feb 2008 23:44:35 +0000 |
parents | 4129c8cfa742 |
children | a26e50cae389 |
rev | line source |
---|---|
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
1 /* |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
2 * Copyright (C) 2001 Bertrand BAUDET, 2006 Benjamin Zores |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
3 * Network helpers for TCP connections |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
4 * (originally borrowed from network.c, |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
5 * by Bertrand BAUDET <bertrand_baudet@yahoo.com>). |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
6 * |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
10 * (at your option) any later version. |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
11 * |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
16 * |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software Foundation, |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
20 */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
21 |
26029 | 22 #ifndef MPLAYER_TCP_H |
23 #define MPLAYER_TCP_H | |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
24 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
25 /* Connect to a server using a TCP connection */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
26 int connect2Server (char *host, int port, int verb); |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
27 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
28 #define TCP_ERROR_TIMEOUT -3 /* connection timeout */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
29 #define TCP_ERROR_FATAL -2 /* unable to resolve name */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
30 #define TCP_ERROR_PORT -1 /* unable to connect to a particular port */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
31 |
26029 | 32 #endif /* MPLAYER_TCP_H */ |