A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Sockets and Internet Protocols
Datagram encoding help needed!
Joined: May 11, 2006
Jan 19, 2007 03:19:00
I am sending some request on ip and receiving it in Datagram packet.
DatagramPacket inPacket; DatagramSocket socket; ... //some other piece of code outPacket = new DatagramPacket(byteOut.toByteArray(),byteOut.size(),address, port); inPacket = new DatagramPacket(message,message.length); ... //some piece of code socket.receive(inPacket); ... //some code String received = new String(inPacket.getData(), 0);
Now, when i am debugging it using Eclipse 3.1. I can see square boxes when i put watch on "received". It is not displaying accurately.
I want to ask, is there some way thay we can set the "send" and "received" requeste encoding?
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
I agree. Here's the link:
subject: Datagram encoding help needed!
Testing datagram packet data received to terminate the program.
Simple problem in running a Server class
I am sending my UDP but can not receive
Broadcasting to addresses
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015