NetCoreServer icon indicating copy to clipboard operation
NetCoreServer copied to clipboard

Update UI control from received message of TcpServer

Open ntustzeus opened this issue 2 years ago • 0 comments

I want to implement a TCP server to receive messages from remote devices, write them to DB and response if needed.

I tried the example of TcpChatServer, it seems that we define a TcpServer in MainClass and it maintain a sessions list, each ession can receive and send messages.

I want to show selected session's received message in text control, maybe WinFrom or WPF, but I can't find the interface or callback from TcpServer class. (TcpSession pass the received message to TcpServer, and we re retrieve in MainClass?)

Can I do this without modify the TcpServer.cs and TcpSession.cs? (I import this package from nuget)

Maybe use a static class to do this?

Is there any suggestion about how to update UI from sessions?

ntustzeus avatar Mar 04 '22 06:03 ntustzeus