Help with read-write data from TCP server-to server (also converting)

Hi everyone! I'm not good in Rust, so I need some your help.
I have a TCP-server and also I have a client.
This is echo server. And it's work!
But now I need to rewrite my task:
Server should stores variable, like A. And A = 1, in the beginning.
Client write in console the value of variable B. And sends it to server.
Server get the B , and do this: A = A*B.
And server must send the value of A to client.
take and receive values should in ut8, so I need to convert it.
A=1, B = 3 send: A = 3;
A = 3, B = 4 send: A = 12

Hi! You'll get better feedback if you format the code in your post according to Forum Code Formatting and Syntax Highlighting.

And you can edit your first post to meet the forum's code formatting and syntax highlighting guidelines by clicking on the pencil icon under that post and adding initial and final lines of three back-ticks before the entire block of code. Many people are like me and simply skip over code where the poster hasn't conformed to the posting guidelines. Bluntly put, it's not worth my effort to attempt to understand it.

Thank you for your advice.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.