Mercurial > mplayer.hg
annotate stream/tcp.h @ 34180:61f7925ff295
Clarify that too old binutils is only an issue with x86_64 compilation.
On OSX people sometimes seem to be unaware what they are actually compiling for...
author | reimar |
---|---|
date | Wed, 26 Oct 2011 18:26:51 +0000 |
parents | b542cd25f03d |
children |
rev | line source |
---|---|
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
1 /* |
26737
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
2 * network helpers for TCP connections |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
3 * (originally borrowed from network.c, |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
4 * by Bertrand BAUDET <bertrand_baudet@yahoo.com>) |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
5 * |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
6 * Copyright (C) 2001 Bertrand BAUDET, 2006 Benjamin Zores |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
7 * |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
8 * This file is part of MPlayer. |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
9 * |
26737
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
10 * MPlayer is free software; you can redistribute it and/or modify |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
13 * (at your option) any later version. |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
14 * |
26737
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
15 * MPlayer is distributed in the hope that it will be useful, |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
18 * GNU General Public License for more details. |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
19 * |
26737
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
20 * You should have received a copy of the GNU General Public License along |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
21 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
a26e50cae389
Use standard license headers with standard formatting.
diego
parents:
26029
diff
changeset
|
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
23 */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
24 |
26029 | 25 #ifndef MPLAYER_TCP_H |
26 #define MPLAYER_TCP_H | |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
27 |
31429
b542cd25f03d
Move network_prefer_ipv4/reuse_socket extern declarations to tcp.h/udp.h.
diego
parents:
26737
diff
changeset
|
28 extern int network_prefer_ipv4; |
b542cd25f03d
Move network_prefer_ipv4/reuse_socket extern declarations to tcp.h/udp.h.
diego
parents:
26737
diff
changeset
|
29 |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
30 /* Connect to a server using a TCP connection */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
31 int connect2Server (char *host, int port, int verb); |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
32 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
33 #define TCP_ERROR_TIMEOUT -3 /* connection timeout */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
34 #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
|
35 #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
|
36 |
26029 | 37 #endif /* MPLAYER_TCP_H */ |