Skip to content
Snippets Groups Projects
Commit 18fc6357 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

improved diagnostics, comments

parent 63a13860
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ public class UdpReceiver
DataInputStream dis = new DataInputStream(bais);
// What happens if you read an integer? Two double values?
float first = dis.readFloat();
float first = dis.readFloat(); // alternatives: readFloat(); readInt();
float second = dis.readFloat();
System.out.println("first: " + first + " second: " + second);
}
......
......@@ -32,7 +32,7 @@ public class UdpSender
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.writeFloat(17.0f);
dos.writeFloat(17.0f); // alternatives: writeFloat(17.0f); writeInt(17);
dos.writeFloat(23.0f);
byte[] buffer = baos.toByteArray();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment