Using a PrintWriter in java (server) to send data through a socket:
JAVA
out = new PrintWriter(client.getOutputStream(), true);
out.println("p1");
Then when I get this value in flash (client):
FLASH AS3
line = socket.readUTFBytes(socket.bytesAvailable);
This if statement is not run:
if (line == "p1") {
And when I trace line to, I get p1 in the output (though when I put in a breakpoint and run in debug, it shows line as being equal to "p1, rather than "p1").