[icecast-dev] net/sock.c question

Mihai RUSU dizzy at roedu.net
Wed Feb 11 23:35:25 PST 2004



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 12 Feb 2004, Michael Smith wrote:

> On Thursday 12 February 2004 03:21, Mihai RUSU wrote:
> > I think this is a good solution because all socket writes are done with
> > sock_write*() so we catch them all this way. Problem is that I think I
> > need a mutex on this values (kbps, kbps_time, kbps_bytes) and it seems
> > sock.c didnt use any yet. Whould it be a problem to use one ? (and include
> > thread/thread.h ?)
> 
> You must not put this logic into sock.c, since that code is shared by other 
> code, it's not solely used in icecast.
> 
> Also, sock_write() doesn't have any access to the client structure, so this 
> wouldn't be a sensible approach anyway.

Ok, thanks for answer Mike.

Can you sugest a "common" place to catch up every socket write without 
modifying every source location where icecast calls socket_write*() ?

PS: I have also spoken with Karl about this and he has in his latest 
patches a send_to_client() routine which would offer be a better way for 
byte counting per source/mountpoint; Im going to look further in his 
patches about this

> Mike

- -- 
Mihai RUSU                                    Email: dizzy at roedu.net
GPG : http://dizzy.roedu.net/dizzy-gpg.txt    WWW: http://dizzy.roedu.net
                       "Linux is obsolete" -- AST
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAKyy/PZzOzrZY/1QRAlheAJ45vJ0JpUlBFsaMunuVmlwNIHeb6ACgxI8L
WA991WZo4bzrfPl1qTBzoOU=
=S4T6
-----END PGP SIGNATURE-----
--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast-dev mailing list