Coloured output over TCP

First post, hopefully not my last :)

So, I know I'm young, but I do know about the OLD BBS software (you know, the kind you telnet into, and everything is by console).

I also know that they run SOLELY on telnet (you dont download any client or anything - simply all by telnet), so this question may be advanced for someone.

I've always wondered - how do you -send- coloured text to a telnet console through network connections?

Hopefully someone can help :)

Thanks!

`SiN
Okay, so after a bit of clever googling, its quite obvious its done with ansi escape codes.

Now the question is: how? How can I send ANSI codes?
Just shove them into a char* or an std::string and send them (at least that's what I do and it seems to work).

e.g.:
send("Red",/*...*/);
As firedraco says, you just send the sequences and the receiving terminal is expected to translate them. Of course, if it doesn't support them, it can either just print them or ignore them. I can't really think of any scenario where they wouldn't be translated but that doesn't mean they don't exist.
Topic archived. No new replies allowed.