Mercurial > mplayer.hg
annotate stream/tcp.h @ 19345:cbf070cfbc77
Restore empty line accidentally deleted with the previous commit.
author | eugeni |
---|---|
date | Sun, 06 Aug 2006 19:58:46 +0000 |
parents | 2a9d669e5ff6 |
children | 3f0d00abc073 |
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 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
22 #ifndef _TCP_H_ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
23 #define _TCP_H_ |
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 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
32 #endif /* _TCP_H_ */ |