i have a TCP client-server application written in C#. My application starts many TCP Client connections and transfer data from remote servers at the same time. Because it starts doing the operation at the same time, there become many user friendly messages to show.
Currently i show these messages on my application within a richtextbox. But this slows down the performans. I am looking for a better way to displaying these messages so that my application can work better.
Can you share any ideas?
Thanks.
i have a TCP client-server application written in C#. My application starts many TCP
Share
A good approach is to use a logging library like log4net for your entire app.
This allows you to configure multiple log appenders, which can be used to filter desired levels of log messages from some or all loggers into different targets (console, log file, a text box, or any other control). If you feel that a level of logging is too detailed for a certain purpose, you can easily disable it by modifying the app configuration file.
You will need to create a custom appender if you don’t want to use preconfigured ones, but there are examples on how to do it: