In weniger als einer Minute können Sie mit dem Lesen von Boost.Asio C++ Network Programming auf Ihrem Kindle beginnen. Sie haben noch keinen Kindle? Hier kaufen Oder fangen Sie mit einer unserer gratis Kindle Lese-Apps sofort an zu lesen.

An Ihren Kindle oder ein anderes Gerät senden

 
 
 

Kostenlos testen

Jetzt kostenlos reinlesen

An Ihren Kindle oder ein anderes Gerät senden

Jeder kann Kindle Bücher lesen  selbst ohne ein Kindle-Gerät  mit der KOSTENFREIEN Kindle App für Smartphones, Tablets und Computer.
Der Artikel ist in folgender Variante leider nicht verfügbar
Keine Abbildung vorhanden für
Farbe:
Keine Abbildung vorhanden

 

Boost.Asio C++ Network Programming [Kindle Edition]

John Torjo

Kindle-Preis: EUR 12,25 Inkl. MwSt. und kostenloser drahtloser Lieferung über Amazon Whispernet

Weitere Ausgaben

Amazon-Preis Neu ab Gebraucht ab
Kindle Edition EUR 12,25  
Taschenbuch EUR 28,88  


Produktbeschreibungen

Kurzbeschreibung

In Detail

Network programming is not new and it’s no secret that it’s not an easy task. Boost.Asio provides an excellent level of abstraction, making sure that with a minimal amount of coding you can create beautiful client/server applications, and have fun in the process!

'Boost.Asio C++ Network Programming" shows how to build client/server applications using a library that is part of the popular peer-reviewed Boost C++ Libraries. It analyzes whether you should go synchronous or asynchronous and the role that threading plays, whilst providing examples you can run and extend for yourself.

After covering the fundamentals of Boost.Asio you’ll discover how you can build synchronous and asynchronous clients and servers. You will also see how you can have your own asynchronous functions play nice with Boost.Asio. As a bonus, we will introduce co-routines, which make asynchronous programming a piece of cake. Nowadays, network programming is a must, no matter what type of programmer you are. "Boost.Asio C++ Network Programming" shows just how simple networking can be, if you’re using the right tools.

Approach

What you want is an easy level of abstraction, which is just what this book provides in conjunction with Boost.Asio. Switching to Boost.Asio is just a few extra #include directives away, with the help of this practical and engaging guide.

Who this book is for

This book is great for developers that need to do network programming, who don’t want to delve into the complicated issues of a raw networking API. You should be familiar with core Boost concepts, such as smart pointers and shared_from_this, resource classes (noncopyable), functors and boost::bind, boost mutexes, and the boost date/time library. Readers should also be familiar with “blocking” versus “non-blocking” operations.

Über den Autor und weitere Mitwirkende

John Torjo

John Torjo is a renown C++ expert. He has been programming for over 15 years, most of which were spent doing C++. Sometimes, he also codes C# or Java.

He's also enjoyed writing articles about programming in C++ Users Journal (currently, Dr. Dobbs) and other magazines.

In his spare time, he likes playing poker and driving fast cars. One of his freelance projects lets him combine two of his passions, programming and poker. You can reach him at john.code@torjo.com.


Produktinformation


Mehr über den Autor

Entdecken Sie Bücher, lesen Sie über Autoren und mehr

Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?


Kundenrezensionen

Es gibt noch keine Kundenrezensionen auf Amazon.de
5 Sterne
4 Sterne
3 Sterne
2 Sterne
1 Sterne
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
Amazon.com: 3.0 von 5 Sternen  4 Rezensionen
16 von 17 Kunden fanden die folgende Rezension hilfreich
2.0 von 5 Sternen Possibly the first Boost.Asio book 3. April 2013
Von Olivier Langlois - Veröffentlicht auf Amazon.com
Format:Taschenbuch
I have been offered by the publisher to read and review this book. I was enthousiast as network programming is really something I like and I have heard about Boost.Asio usage in some projects without really having taken the opportunity to check out myself what Boost.Asio really was.

The outcome of having read it is that I was left with a lot more unanswered questions than I have received answers. It is a very short book probably of the style 'hands on' 'direct to the point' type of book which I guess has merits so someone can start reading it and hack something very fast. However, in my opinion, this is overdone making the book a bad choice for learning network programming.

My first unanswered question I had when I picked up the book is Why should I use Boost.Asio and what are its benefits over other existing frameworks? Of course, I know the answer that you can find also in the excellent book Network programming in C++ plus the fact that Boost.Asio is fully integrated with STL but the explanation is totally missing from the book.

Explanation between synchronous and asynchronous is very simplistic and can be resume as 'async is more complex than sync but eventually you will prefer async for performance reasons'. It got me a little confused for knowing that the *nix socket API and the Winsock API you can do:

blocking IO
Nonblocking IO or
async IO

which are three different ways of performing IO. I am guessing that what is really done with Boost.Asio is non blocking IO which is close to real async IO and much more common place but nowhere in the book we take the time to really explain what Boost.Asio is really doing.

Code examples are ok I guess so the author can make his point but I spotted a couple less than perfect code which I think is hurting the book credibility. I know this is a harsh judgement but for a book that aims to teach people how to program you have to be examplar as what you teach will be replicated by your readers. I am expecting perfection from a book examples. The type of code that you stare at for some time without being able to figure out how you could improve it. That is the type of quality that you'll get from a book written by Stroustrup or Stevens.

Here are two examples of what I mean:

if ( std::find(c.buff, c.buff + c.already_read, '\n') < c.buff + c.already_read) {
int pos = std::find(c.buff, c.buff + c.already_read, '\n') - c.buff;

1. It is inefficient to call twice std::find(). Imagine that '\n' is the last character in a 2GB array!
2. comparing iterators with the operator '<' works because in this case the container happens to be a POD array but IMO this is bad style to use STL algorithm in a way that will not works on all containers (ie std::list) when using the more common operator != would achieve the same result.

synchronous server code:

void handle_clients() {
while(true)
for (int i = 0; i < clients.size(); ++i)
if ( clients[i].sock.available() ) on_read(clients[i]);
}

This works but polling sockets like crazy and sucking 100% of the processor is not the way to write a server that use synchronous mode. I understand that the book did not aim to be a network programming bible like a Stevens but I would have liked some network theory background. Things such as the different possible server topologies and their benefits drawbacks of each. A very small TCP primer. How TCP connections are established from a client? from a server? I know all that but I tried to have some empathy for the young reader who haven't been exposed to this basic knowledge and since these basics are totally absent from the book, it will be even harder for him to make sense out of the book. This is the first edition so hopefully it will eventually improved.

To conclude, the book has some problems but if you can get a cheap copy it might serve as a very fast introduction to Boost.Asio and get you exposed to the API.
6 von 6 Kunden fanden die folgende Rezension hilfreich
3.0 von 5 Sternen I'm glad ASIO is getting attention... 21. April 2013
Von Will McDoe - Veröffentlicht auf Amazon.com
Format:Taschenbuch
... but this isn't the attention it deserves.

The good: this is somewhat easier to read than the Asio examples and docs.

The bad: this is a somewhat fluffed version of the Asio examples and docs. There are a lot of assumptions about what the reader does/doesn't know about Asio and the gaps aren't filled in by the book alone.

I picked this book up because Torjo wrote a fantastic logging library back in the day, and Asio being a fantastically powerful library, I expected a fantastically decent book, but I was disappointed (the number of pages should have been an indicator). The examples are different and modestly improved upon what you'd find online in the Asio examples, but as an experienced Asio user, I didn't benefit from the read. When bringing new developers up to speed on Asio, this book didn't fill in the gaps or bring them up to speed (at least that's been my luck so far).

I haven't returned it, but I have lent it out a few times and ultimately its value is modest. It is useful in so far as it fills the instructional role as a container of a few dozen examples that I can point and use while filling in the gaps. But again, it's a supplement, not a primary source (I would like to see that change over time, however - maybe a mulligan edition that's dramatically expanded in size and scope?).

Asio is an amazing library, and an expansive - and consequently an advanced - library, so I support all authors who have published works on this subject. I wish more effort and time was spent on this book before it was pushed out the door. "Introduction to the Boost C++ Libraries; Volume II - Advanced Libraries" seems to be doing a better job of educating people re: Asio (which is surprising because it only has a few chapters on the subject). As things stand, I have both on my shelf as references for new Asio programmers.
6 von 7 Kunden fanden die folgende Rezension hilfreich
4.0 von 5 Sternen My thoughts 11. März 2013
Von Marc Gregoire - Veröffentlicht auf Amazon.com
Format:Taschenbuch
I love the Boost libraries, and I'm interested in network programming, so I decided to read this book. The book has a hands-on approach with a couple of sample programs. What I like is that these sample programs have been structured in such a way so they can be reused for your own projects. They are like skeleton examples, and all source code can be downloaded from the book's website.

The book does not cover any real networking theory. For example don't expect an in-depth discussion of how the TCP, UDP, or ICMP protocols work; that's not the goal of this book. The goal is to show, with practical examples, how to use the Boost.Asio networking library.

While reading chapter 1, my initial reaction to the contents was rather negative. Chapter 1 is a bit convoluted, not so easy to understand, and even has a couple of errors in it. However, subsequent chapters are structured more logically and are understandable, though sometimes a discussion accompanying a piece of code can be a bit brief.

As an introduction to the library, Chapter 3 shows a basic Echo client/server example which is quite good. There is a synchronous and asynchronous TCP implementation of the client and server, and also a synchronous UDP implementation of the client and server. Subsequent chapters implement more useful client/server applications.

The book is not your one-stop destination for everything related to the Boost.Asio library, but it's a great introduction to get you started with the library, to get to know the terminology used in the library, to learn about the difference between synchronous and asynchronous programming, to learn how to use multi-threading using the Boost threading library, and to get nice skeleton applications that you can reuse in your own projects. Several skeleton applications are provided such as synchronous and asynchronous versions, and single-threaded and multi-threaded versions.
1 von 3 Kunden fanden die folgende Rezension hilfreich
3.0 von 5 Sternen It's okay. 20. Juni 2013
Von Marvin Ottley - Veröffentlicht auf Amazon.com
Format:Taschenbuch|Verifizierter Kauf
While informative, the ideas behind the design choices are not clearly explained. This book informs the reader that the .Asio is available. It's necessarily clear in its explanation on usage. More examples would have been usefull.
Waren diese Rezensionen hilfreich?   Wir wollen von Ihnen hören.

Kunden diskutieren

Das Forum zu diesem Produkt
Diskussion Antworten Jüngster Beitrag
Noch keine Diskussionen

Fragen stellen, Meinungen austauschen, Einblicke gewinnen
Neue Diskussion starten
Thema:
Erster Beitrag:
Eingabe des Log-ins
 

Kundendiskussionen durchsuchen
Alle Amazon-Diskussionen durchsuchen
   


Ähnliche Artikel finden