1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2001, 2002 VideoLAN
5 * $Id: mmsh.h,v 1.3 2003/08/17 23:02:51 fenrir Exp $
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
39 static int chunk_parse( chunk_t *, uint8_t *, int );
41 #define BUFFER_SIZE 150000
46 input_socket_t *p_socket;
49 int i_request_context;
53 uint8_t buffer[BUFFER_SIZE + 1];
55 vlc_bool_t b_broadcast;
61 uint32_t i_packet_sequence;
62 unsigned int i_packet_used;
63 unsigned int i_packet_length;
71 static input_socket_t * NetOpenTCP ( input_thread_t *, url_t * );
72 static ssize_t NetRead ( input_thread_t *, input_socket_t *, byte_t *, size_t );
73 static ssize_t NetWrite ( input_thread_t *, input_socket_t *, byte_t *, size_t );
74 static void NetClose ( input_thread_t *, input_socket_t * );
77 static ssize_t NetFill( input_thread_t *, access_sys_t *, int );
79 typedef struct http_field_s
84 struct http_field_s *p_next;
94 http_field_t *p_fields;
101 static http_answer_t *http_answer_parse ( uint8_t *, int );
102 static void http_answer_free ( http_answer_t * );
103 /* static char *http_field_get_value ( http_answer_t *, char * ); */
104 static http_field_t *http_field_find ( http_field_t *, char * );
106 static int mmsh_start( input_thread_t *, access_sys_t *, off_t );
107 static void mmsh_stop ( input_thread_t *, access_sys_t * );