node.js carriage return

Status
Not open for further replies.

Adonn

New Member
Mar 25, 2011
27
4
I'm having a little bit of an issue with running a TCP server using node.js ...
Im trying to construct a server using node.js, for a Habbo v1 client.

Here's my issue:
At the end of a v1 packet (or so I believe this it how it works), there must be an ASCII character inserted (more specifically id 13). I know the javascript function to return this character, but it doesn't seem to work.
I have constructed a chr(id) function, similar to that of PHP, to return the ASCII value of the character id.

socket.write("HELLO" + chr(13));

The client hangs on this packet, because it's expecting that ASCII character, also known as a carriage return, but it doesnt seem to recieve it. I have also tried \n and \r, with the necessary backslash escaping as well.

Any help would be greatly appreciated.
Thanks,
Adonn
 
Status
Not open for further replies.

Users who are viewing this thread

Top