Author Topic: Server TCP Objects not functioning properly, client are fine - Solved  (Read 1541 times)

Depends on OS and the program.

Notepad ignores \r and \n if they're not together. It also ignores character 0.

Sometimes you may get boxes, I believe character 7 (BEL) is one of them.




what determines these names?
They all have special meanings.

00 NUL
07 BEL
09 TAB
10 NL or \n
13 CR or RETURN or \r

what the hell is BEL for?
it closed and reopened my tab
10 and 13 seem to be giving me wingdings, not new lines and returns

i'm making a definite note of 09 for when i'm coding on the forums

who defined them?
ASCII

And also, the BEL was originally made to, well, make a sound on the receiving machine. More info on the control characters in the link I gave.

Odd, they seem to need to all be prefixed by 0

010
013
as opposed to just plain 13 or 10

There is no difference.

Just note the difference between hex and decimal

ASCII has a total of 256 characters (including Extended ASCII).

The string "WARNMSG" takes up a total of 7 bytes. This may be an acceptable amount of data to transfer if the networking implementation is efficient and you aren't sending it often.

However, since TCPObjects are horribly implemented, you really should attempt to minimalize the amount of data sent and received.

Instead of sending long names over the network, you can define a set of characters from ASCII that you use to indicate the command.

For example, you could say that ASCII #1 (\x01, not counting \x00 because TorqueScript doesn't support it) could do action x, ASCII #2 (\x02) does y, etc.

One character takes up one byte. You've just reduced the "WARNMSG" from 7 bytes to 1 byte.