summaryrefslogtreecommitdiff
path: root/src/xine-engine/io_helper.h
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@users.sourceforge.net>2004-04-06 18:40:32 +0000
committerFrantišek Dvořák <valtri@users.sourceforge.net>2004-04-06 18:40:32 +0000
commit81de862996c8af79e73f550b0160e9c091722a71 (patch)
tree4238cb0fc73853330703311997d476bb8da79265 /src/xine-engine/io_helper.h
parent97ea1a1a3bf93b3fd47fa2aa69ca7a9cc47ba7bf (diff)
downloadxine-lib-81de862996c8af79e73f550b0160e9c091722a71.tar.gz
xine-lib-81de862996c8af79e73f550b0160e9c091722a71.tar.bz2
Patch for using timeout in cddb lookup (xine was freezed just because of firewall!!!).
New functions into io_helper: _x_io_tcp_connect_finish ... wait for successful connect with timeout _x_io_tcp_read_line ... read the string from the socket (improvements neded) Use io_helper functions in input_cdda. Don't try connect again to freedb server, if previous connecting was failed. CVS patchset: 6337 CVS date: 2004/04/06 18:40:32
Diffstat (limited to 'src/xine-engine/io_helper.h')
-rw-r--r--src/xine-engine/io_helper.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xine-engine/io_helper.h b/src/xine-engine/io_helper.h
index bcaff1b08..0b1d522e3 100644
--- a/src/xine-engine/io_helper.h
+++ b/src/xine-engine/io_helper.h
@@ -66,6 +66,11 @@ int _x_io_select (xine_stream_t *stream, int fd, int state, int timeout_msec);
int _x_io_tcp_connect(xine_stream_t *stream, const char *host, int port);
/*
+ * wait for finish connection
+ */
+int _x_io_tcp_connect_finish(xine_stream_t *stream, int fd, int timeout_msec);
+
+/*
* read from tcp socket checking demux_action_pending
*
* network input plugins should use this function in order to
@@ -107,4 +112,9 @@ off_t _x_io_file_read (xine_stream_t *stream, int fd, char *buf, off_t todo);
*/
off_t _x_io_file_write (xine_stream_t *stream, int fd, char *buf, off_t todo);
+/*
+ * read a string from socket, return size length
+ */
+int _x_io_tcp_read_line(xine_stream_t *stream, int sock, char *str, int size);
+
#endif