[gnet] sizeof buffer recived whit udp socket



Hi,

I’m using the udp socket examples of gnet, i recive a “gchar buffer[1024]”, but my buffer is a xml and to parse it I can not have more data in the buffer other than xml itself. So the buffer I receive is 1024 long and contains 150 chars (that is the size of my xml). Hoe can I reduce de buffer from 1024 to the size odf what is inside?    Can I copy the buffer until the “\0” (EOF), so that when I pass the parser it receives only xml data?

 

Please If any one could give a hint ..

Tks, Rodrigo

 

 

***********************************

 

Rodrigo de Meneses Barcelos Cabeceiras

Rua do Ameal nº.507 5ºEsq.

4200-061 Porto

Tel. 917776045

 

msn: rodrigo cabeceiras tvtel pt    

Web www.rodrigocabeceiras.pt.to

 

***********************************

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]