Originally Posted by
LuckY
I had to chuckle at your request, maxorator, because what you're asking is a very tall request. It sounds like such a simple little favor, but you're asking for an "example" of something and that something happens to require someone to author the entire body of "your" program's primary functionality.
You are obviously very new to C++ programming. You really must learn and familiarize yourself with the language and it's concepts before you jump into something as complicated as socket programming. However, if you insist on persisting, do a lot of reading to earn a better comprehension before you jump into the icy waters. Good luck.