Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2011-04-27
Medium Priority
Last Modified: 2012-05-11
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
Question by:SME_Paddington
1 Comment
LVL 24

Accepted Solution

fridom earned 2000 total points
ID: 35481131
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:


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question