search for: sock_write

Displaying 20 results from an estimated 63 matches for "sock_write".

2005 Jun 27
3
IE/FLASH/ICECAST
Hello, I've created a macromedia flash player in order to play icecast mp3 streaming. Icecast is configued on the port 8000 and It's ok with winamp. In my flash movie, I've used loadSound("<streaming>",true) on a Sound object. It's ok on Mozilla based browsers but some user don't have sound on Internet Explorer. D't understand? Is there an issue? Thx
2005 Jun 27
3
AW: IE/FLASH/ICECAST
...wrote: > hi, > > icecast 2.2.0 has to be patched slightly to work with flash-players using > the sound-object - cant find the exact link to this, maybe one of the > developers can explain? I just added 4 lines at the end of > format_mp3_send_headers() in format_mp3.c: > > sock_write(client->con->sock, "Cache-Control: no-cache\r\n"); > sock_write(client->con->sock, "Pragma: no-cache\r\n"); > sock_write(client->con->sock, "Connection: keep-alive\r\n"); > sock_write(client->con->sock, "Content-Length: 54000000\r\...
2004 Aug 06
3
net/sock.c question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I have started to add bandwidth <limit> option to icecast. My ideea is to compute the current bandwidth by estimation on each sock_write*() call. Something like this: 1. initially we set kbps = 0, kbps_time = now and kbps_bytes = 0 2. after some time, a sock_write*() function is called which in turn calls sock_kbps_update(nobytes); sock_kbps_update fetches current timestamp, adds nobytes to kbps_bytes then: 2.1 if the time diffe...
2004 Aug 06
2
icecast 2 compatibility with older clients
...ral_headers(format_ var = (http_var_t *)node->key; if (strcasecmp(var->name, "ice-password") && (!strncasecmp("ice-", var->name, 4) || - !strncasecmp("icy-", var->name, 4))) { - bytes = sock_write(client->con->sock, + !strncasecmp("icy-", var->name, 4))) { + if (client_is_icy) + bytes = sock_write(client->con->sock, "icy%s:%s\r\n", + var->name + 3, var->value); + else + bytes = sock_write(client->con->sock,...
2005 Jun 27
0
AW: IE/FLASH/ICECAST
hi, icecast 2.2.0 has to be patched slightly to work with flash-players using the sound-object - cant find the exact link to this, maybe one of the developers can explain? I just added 4 lines at the end of format_mp3_send_headers() in format_mp3.c: sock_write(client->con->sock, "Cache-Control: no-cache\r\n"); sock_write(client->con->sock, "Pragma: no-cache\r\n"); sock_write(client->con->sock, "Connection: keep-alive\r\n"); sock_write(client->con->sock, "Content-Length: 54000000\r\n"); can&...
2005 Jun 28
0
AW: AW: IE/FLASH/ICECAST
....2.0 has to be patched slightly to work with > flash-players using > > the sound-object - cant find the exact link to this, maybe > one of the > > developers can explain? I just added 4 lines at the end of > > format_mp3_send_headers() in format_mp3.c: > > > > sock_write(client->con->sock, "Cache-Control: no-cache\r\n"); > > sock_write(client->con->sock, "Pragma: no-cache\r\n"); > > sock_write(client->con->sock, "Connection: keep-alive\r\n"); > > sock_write(client->con->sock, "Content-Leng...
2004 Aug 06
1
Patch to add User-Agent to libshout
...======================================= RCS file: /usr/local/cvsroot/libshout/src/shout.c,v retrieving revision 1.48 diff -u -r1.48 shout.c --- src/shout.c 13 Jul 2003 16:31:20 -0000 1.48 +++ src/shout.c 21 Jul 2003 04:20:22 -0000 @@ -756,7 +756,7 @@ char *auth; char *ai; - if (!sock_write(self->socket, "SOURCE %s HTTP/1.0\r\n", self->mount)) + if (!sock_write(self->socket, "SOURCE %s HTTP/1.0\r\nUser-Agent: libshout/%s\r\n", self->mount, VERSION)) return SHOUTERR_SOCKET; if (self->password && (auth = http_basic_a...
2005 Jun 20
1
Flash Player
Is there any flash based players out that can be embedded into a webpage and stream a icecast feed? -=-=-=-=-=-=-=Ottawa Valley Weather-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Weather @ 5:50pm - Temp: 31.1?C - Humidity 23% - Wind: W @ 0 km/h Baro: 1001kPa Falling - Vis: 24km - Sky: Few Clouds - Weather: --- Hourly Rain: 0.00mm - Daily Rain: 0.00mm - Total Rain(May 28th): 1.00mm =-=-=-=
2004 Aug 06
0
icecast 2 compatibility with older clients
...ral_headers(format_ var = (http_var_t *)node->key; if (strcasecmp(var->name, "ice-password") && (!strncasecmp("ice-", var->name, 4) || - !strncasecmp("icy-", var->name, 4))) { - bytes = sock_write(client->con->sock, + !strncasecmp("icy-", var->name, 4))) { + if (source->format->type == FORMAT_TYPE_MP3) + bytes = sock_write(client->con->sock, "icy%s:%s\r\n", + var->name + 3, var->value); + else + bytes = sock_writ...
2004 Aug 06
5
Missing headers in Icecast2
Hi Karl, Thanks for your help, About the "Connection:" header, you are right, it's: "Connection: close" and NOT "Connection: keep-alive". The protocol when the SERVER sends the data is http 1.0. It's http 1.1 when the browser requests the data. I don't understand the "Content-Length: 54000000" header either. Also I noticed the flash player on
2005 Jun 29
0
Re: Icecast Digest, Vol 13, Issue 45
...work with > > flash-players using > > > the sound-object - cant find the exact link to this, maybe > > one of the > > > developers can explain? I just added 4 lines at the end of > > > format_mp3_send_headers() in format_mp3.c: > > > > > > sock_write(client->con->sock, "Cache-Control: no-cache\r\n"); > > > sock_write(client->con->sock, "Pragma: no-cache\r\n"); > > > sock_write(client->con->sock, "Connection: keep-alive\r\n"); > > > sock_write(client->con->sock, &qu...
2007 Jun 24
1
There was a problem by the use of snow.
...static size_t sock_read(void *ptr, size_t size, size_t nitems, Rconnection con) { + int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv)); + + R_SockTimeout(timeout); return sock_read_helper(con, ptr, size * nitems)/size; } static size_t sock_write(const void *ptr, size_t size, size_t nitems, Rconnection con) { + int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv)); Rsockconn this = (Rsockconn)con->private; + R_SockTimeout(timeout); return R_SockWrite(this->fd, ptr, size...
2004 Aug 06
3
icecast2 ogg vorbis client request headers
I have tried that, but not sure if i am doing that right. in connection.c starting line 847 i believe, it sends this bytes = sock_write(client->con->sock, "HTTP/1.0 200 OK\r\n" "Content-Type: audio/x-mpegurl\r\n\r\n" "http://%s:%d%s\r\n", host, port, sourceuri...
2004 Aug 06
4
Missing headers in Icecast2
On Saturday 06 December 2003 17:12, Macsym wrote: > Hi Karl, > > I just checked in Icecast1 source, the line: > > if (client_wants_content_length (con)) > sock_write (con->sock, "Cache-Control: no-cache\r\nPragma: > no-cache\r\nConnection: close\r\nContent-Length: 54000000\r\n"); > > > is located in "client.c". Shouldn't I add this line in "client.c" of > Icecast2 instead of "format_mp3.c" as you adv...
2004 Aug 06
1
minor error in http response
...n http code 400, not 404. i love this project and like to participate. --- client.c.orig 2004-04-19 17:35:26.000000000 +0800 +++ client.c 2004-04-19 17:36:37.000000000 +0800 @@ -54,11 +54,11 @@ void client_send_400(client_t *client, char *message) { int bytes; - bytes = sock_write(client->con->sock, "HTTP/1.0 404 File Not Found\r\n" + bytes = sock_write(client->con->sock, "HTTP/1.0 400 Bad Request\r\n" "Content-Type: text/html\r\n\r\n" "<b>s</b>\r\n", message); if(bytes > 0)...
1999 Jul 16
1
R-0.64.2 ssize_t not defined in src/unix/sock.h
...ering directory `/tmp_mnt/xxxx/src/R-0.64.2/src/unix' gcc -g -O2 -I../include -I../../src/include -c Rsock.c -o Rsock.o In file included from Rsock.c:8: sock.h:21: parse error before `Sock_read' sock.h:21: warning: data definition has no type or storage class sock.h:22: parse error before `Sock_write' sock.h:22: warning: data definition has no type or storage class Rsock.c: In function `Rsockwrite': Rsock.c:112: `ssize_t' undeclared (first use in this function) Rsock.c:112: (Each undeclared identifier is reported only once Rsock.c:112: for each function it appears in.) Rsock.c:112:...
2006 May 19
1
make error for R-2.3.0
...o sockconn.o In file included from sockconn.c:34: sock.h:38: error: syntax error before "Sock_read" sock.h:38: warning: type defaults to `int' in declaration of `Sock_read' sock.h:38: warning: data definition has no type or storage class sock.h:39: error: syntax error before "Sock_write" sock.h:39: warning: type defaults to `int' in declaration of `Sock_write' sock.h:39: warning: data definition has no type or storage class make[4]: *** [sockconn.o] Error 1 make[4]: Leaving directory `/home/lgd/rjohnson/bin/R-2.3.0/src/modules/internet' make[3]: *** [R] Error 2 ma...
2004 Aug 06
4
icecast2 ogg vorbis client request headers
...AM Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers <p>> On Fri, 2 Apr 2004, Dave St John wrote: > > > I have tried that, but not sure if i am doing that right. > > in connection.c starting line 847 i believe, it sends this > > bytes = sock_write(client->con->sock, > > "HTTP/1.0 200 OK\r\n" > > "Content-Type: audio/x-mpegurl\r\n\r\n" > > "http://%s:%d%s\r\n", > > host, > > port...
2004 Aug 06
2
new features request
...isteners isnt enough when you have variable bit rate streams) is to refuse clients when current kbps its over some configured limit. > That way icecast2 doesnt have to take up extra resources to handle > bandwidth limitations. Besides my initial ideea of adding a general lock into net/sock_write*() which I see it can be a resource hog not to mention it brakes the structure of the current icecast2 codes, I dont think this uses much resources. The byte count computations could be conditioned if the max_kbps value is configured > -1 (which means if its activated). So that way the reso...
2004 Aug 06
1
playlist problem
...ankfully!). Anyway, here's a patch that does the trick. Cheers, Paul. -------------- next part -------------- --- ../icecast/src/connection.c.~1.69.~ 2003-04-27 20:48:02.000000000 +1000 +++ ../icecast/src/connection.c 2003-04-27 22:19:33.000000000 +1000 @@ -745,7 +745,7 @@ bytes = sock_write(client->con->sock, "HTTP/1.0 200 OK\r\n" "Content-Type: audio/x-mpegurl\r\n\r\n" - "http://%s:%d%s", + "http://%s:%d%s\r\n", host,...