zlib over sockets

zlib over sockets

Post by Heiko Jap » Wed, 04 Apr 2001 00:26:18



Hi,

is it possible to use the zlib-functions (like gzdopen, gzread,
gzwrite) over a socket-connection?
I opened the socket and than use the gzdopen-function to use
the fd, than using gzread to read some data (and of course using
gzwrite to send data from the client).

At now, i hadn't much luck -- using blocking and unblocking
io-mode.

Any idears? -- or say: "its not possible"?

Thanx!

Heiko

--
Heiko Jappe                                 Telefon : +49(0)431-7164191
G.I.S. Global Information Services GmbH     Telefax : +49(0)431-7164192

D-24145 Kiel                                WWW     : http://www.gis.de

 
 
 

zlib over sockets

Post by Donald McLachl » Wed, 04 Apr 2001 22:45:35


Don't know about that but you could always do what I did.  That is try to
compress the data, if the result is smaller send tht, else send the original.
Big win on slow (9600 bps) long delay (8 sec RTT) network connections.

Don

--

Communications Research Centre / RNS    Tel     (613) 998-2845
3701 Carling Ave.,                      Fax     (613) 998-9648
Ottawa, Ontario
K2H 8S2
Canada