In the documentation of the Telnet server the only way to print a message to the client is when previously a command has been entered. I have a case now where I have a long stream of data that I can't store anywhere. I would have to print the values to the Telnet client int16 by int16 and, if possible, so that the old line gets overwritten by the new line.
If I consider what many great things the Linux community can do in their shell, I think it should definitely be possible somehow. I know it is a questionable approach. I am only the one who is supposed to implement it :)
I just saw that there indeed is a poll function for unsolicited messages. Is that what I am looking for?
Yes, you can achieve this with unsolicited messages.
Use the telnet_server_message_poll and telnet_server_message callback functions. When you have a message (or part of a message) available, return true from telnet_server_message_poll(). This will let the Telnet server know that an unsolicited message is available. The server will then call telnet_server_message(telnetServerUnsolicitedMessage,...). In this function, copy the message to the telnet output buffer.