• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 588
  • Last Modified:

C++ How to: Send Values over TCP/UDP

Dear Experts,

I would like to be able to echo the contents of cout to another computer, through using TCP/ UDP. Is there any command or function that you can think of that will allow me to do this.

Picture attached is related. I would like the ASCII dragon to be echoed/ output to the client below, and vise versa. The dragon is not received in blocking mode, a packet is merely received to allow the program to continue.

Cout UDP TCP C++ Network
Essentially what I want to know, is a way I can echo values (strings, int's, chars, etc.) from my console to another console via the network.

I currently used structured messages - should I just build upon the use of these?

Kind Regards, SME_Paddington
1 Solution
There is an excellent example of this in the libapr library from apache. I guess there will be some C++ wrapper for using it. The libapr homepage is:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now