i didn't tryed by this way, did you tried with 32 and 64 bits machines 
and little endian and big endian?

George M. Zouganelis escreveu:
> Roberto Spadim wrote on 11/1/2007 03:25:
>> i know some java stream functions and some unpack and pack functions 
>> to work with ownet any develop send to us
>>
>
> as far as I know and having test it, java handles network transmition 
> of integers without packing/unpacking ,
> if this is what you are refering to.
>
> the following works for me :
>
>     private void sendPacket(DataOutputStream out, int function, int 
> payload_len, int data_len) throws IOException
>     {
>       int[] buff = new int[OWNET_PROT_STRUCT_SIZE];
>       buff[OWNET_PROT_VERSION] = 0;
>       buff[OWNET_PROT_PAYLOAD] = payload_len;
>       buff[OWNET_PROT_FUNCTION] = function;
>       buff[OWNET_PROT_FLAGS] = 258;
>       buff[OWNET_PROT_DATALEN] = data_len;
>       buff[OWNET_PROT_OFFSET] = 0;
>       for (int i = 0; i<OWNET_PROT_STRUCT_SIZE; i++) { 
> out.writeInt(buff[i]); }
>     }
>
>
> Still 'm not sure if i missing something..
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 10/01/2007 / Versγo: 
> 5.1.00/4936
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>   



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to