Blockland Forums > Modification Help

Server TCP Objects not functioning properly, client are fine - Solved

Pages: << < (5/5)

Lugnut:

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

Ipquarx:


--- Quote from: Lugnut1206 on May 07, 2012, 04:51:09 PM ---who defined them?

--- End quote ---
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.

Lugnut:

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

010
013
as opposed to just plain 13 or 10

Kalphiter:

There is no difference.

Just note the difference between hex and decimal

Port:

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.

Pages: << < (5/5)

Go to full version