Just use a tcp socket and a bytebuffer.

On Thu, Dec 29, 2011 at 6:47 AM, SL@maxis <[email protected]> wrote:

>
> I am sorry, I think this is not strictly an android question.
>
> From an android device, I want to a message to a PC via a socket.
>
> I am going to pack my data as follows:
>
>  xxxaaaaThis is a greeting.
>
> where:
>
> xxx  - message type (3 bytes, text)
> aaaa - integer, 4 bytes, length of text
> 'This is a greeting.' - the actual text
>
> The program at PC needs to decode the byte stream.
>
> I have done that in C/C++; not too sure with JAVA.
>
> I have searched for a while on net, now I have got headache (I am going to
> take a rest for a while). :-( :-(
>
> Java gurus please recommend. Thanks.
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com<[email protected]>
> To unsubscribe from this group, send email to
> android-developers+**[email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/,
http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to