rank trend

C# Network Programming

by Richard Blum
Released 2002-11-26
Buy it from AmazonNew for $40.43

16 Reviews

Sort by: Most Helpful ▲ Date Rating

2 stars Doesn't go deep enough into the real issues

2005-09-05     9 of 11 found this review helpful

This book is a good introductory book to network programming in general. While it attempts to cover all the general topics that you can find in reference books like "TCP/IP Illustrated", it seriously lacks the breadth and depth of such reference books and falls short of tackling the real issues of Network Programming with the .Net frameowrk in C#.

The .Net framework and the C# language bring some new design patterns and some paradigms that are definitely different from what we used to see with C/C++ or Java and I found that this book while containing a lot of source code examples in C# lacks coverage of such patterns and the .Net way of solving issues like high performance multi-client servers, performance oriented data handling over network connections, multi-threaded network applications design patterns in C# and .Net framework,...

In summary, if you are new to C#, .Net and have never programmed network applications in another language and are looking for a book that covers a lot of subjects, this is your book. If you already have the TCP/IP Illustrated books and want an advanced book about how .Net and C# apply to network programming, I recommend "TCP/IP Sockets in C#", a much smaller book but extremely focused on what the title says!

4 stars Good book for learning TCP/IP programming

2003-01-20     8 of 9 found this review helpful

This is a good book for learning network programming especially from Microsoft .NET viewpoint. The book has extensive coverage of Sockets which is the standard API for programming with TCP/IP. I am teaching a new course on Internet Protocols and Client-Server Programming and I am thinking of adopting the book as a reference for the programming labs we do in the course. I have few minor shortcomings on the book which I will pass to the author directly but overall the book is very good.

5 stars thorough introduction to network programming

2005-06-20     7 of 8 found this review helpful

This is an excellent introduction to network programming. Even if you don't use C#/.NET, you may still want to have a look at this book as it discusses IP programming and techniques from first principles. For example, the book includes an overview of socket programming in the Unix world, then moves on to Winsock specifics before introducing the socket and higher-level classes in .NET. I really like the author's approach of explaining multiple ways to solve a particular network programming issue, such as how to deal with the fact that using TCP by itself doesn't preserve message boundaries.

All of the code samples can be downloaded from the Sybex website and there is complete and perfect tie-in to the samples from the book. In fact, all of the code is reproduced in the book so you can effectively read it from cover to cover without a computer. Besides just listing source files, the author always explains what each block of code is doing.

The code samples typically consist of self-contained client and server programs that illustrate a particular network programming topic. I found most of them can be tested on the same PC (except that you won't be able to analyze the network traffic as there won't be any). A few of them require two PCs as the client and server bind to the same IP port. To test the SNMP client programs, I didn't have access to a real Cisco router so I just downloaded a trial version of an SNMP agent simulator from iReasoning to test the programs.

To reach the largest audience, the book describes how to compile, build and debug the sample programs using the command line tools in the .NET Framework SDK (which is a free download from Microsoft). I used Visual Studio .NET 2003 instead and had no problems with building any of the samples.

Overall, the book does a great job of explaining what can be a complex subject area. It would have been good though if the author included an advanced topics chapter that discusses popular network-aware applications (such as chat programs, file-sharing systems, etc) and how they are implemented architecturally.

5 stars Highly recommended

2005-10-11     6 of 8 found this review helpful

I used a number of books as references for a server project in C#, including the "TCP/IP Sockets in C#" book referenced in another review, but that book is more geared toward academic use (though to his credit I emailed one of the authors of the book regarding multithreading issues that were not addressed in print and he was very responsive, so I support the purchase of that book to round out your sockets library as well). Blum's book provided far more practical advice relating to my project and was the one I consistently returned to for reference. I had an issue not addressed directly in the book, did a Google search on it and found the answer...by the book's author in an online discussion forum!

In short, it is virtually impossible to find a book that addresses every last real-world gotcha inherent in starting any new project with a new language and class library as vast as .NET's, but if you have a C# sockets project to do then I can't recommend another book more than this one.

5 stars Very good book - deserves way more credit that it's getting

2004-05-06     6 of 6 found this review helpful

I really found this book to be highly informative. I credit this one for helping me learn most of what I know about C# socket level programming. Topics covered various non-blocking methods including asynchronous processing via delegates, using threads both manually and with threadpools. He even included sections on how to handle incoming connections by polling. I also liked his "when TCP goes bad" chpater which discusses how to use .NET to circumvent errors and inconsistencies in transmission.

Yes, this book does tackle tricky programming issues - but that's the nature of socket programming. If you want to get the most out of this book, read it several times and start writing your own programs using the techniques described. I spent quite a bit of time with this book writing a light-weight custom HTTP server using what I learned from this book.

4 stars Good, but...

2003-11-28     6 of 6 found this review helpful

Overall this is a very good book. It has many examples with the entire source code to run different client and server programs. Although, I understand this might be a book for beginners, I was hoping to find out how to code a server for a very high volume of client connections. The book explains how to use the ThreadPool, but that is only good for up to 25 clients per CPU. The book also shows an example creating a thread for each client connection, but if there are hundreds of connections that will require the creation of hundreds of threads. So, the book does not really give any answers to the issue with large number of connections.

Still, I enjoyed reading this book very much, but I feel that I might need to get a more advanced book.

3 stars OK for a sys admin

2007-03-08     5 of 5 found this review helpful

This is a good book if you are a systems admin (like the author) wanting to write simple network programs in C#. However, the author has a very limited knowledge of .NET programming. In most of his numerous code samples, his ignorance of CLR fundamentals shine through. For instance, on page 192 he has these lines of code in the VarTcpSrvr.cs listing:

byte[] datasize = new byte[4];
datasize = BitConverter.GetBytes(size);

The first line of code creates a new byte array named datasize on the managed heap. Then the call to BitConverter.GetBytes(...) returns another byte array and stores the reference in datasize! The first byte array will now be garbage collected, as it is no longer referenced and was never used in the first place. The book is filled with code examples like this.

If you are a professional developer, the book doesn't have much to offer, as you will likely already know nearly as much as (if not more than) the author. Not to mention, seeing all the poor coding samples will likely become a distraction. I still give this book three stars because the networking content is good and the code samples do, in fact, seem to work. They just happen to be coded poorly. Since the author doesn't really understand the platform he's coding on, approach with caution -- especially if you are a beginner.

5 stars Excellent!

2005-06-08     5 of 5 found this review helpful

This is one of those rare books that combines simple, direct, and to-the-point code examples with simple, direct, and to-the-point explanations. Both TCP/IP and UDP are covered, and there is an excellent discussion of what has to be done to interface with a non-Windows operating system. This is the clearest treatment of Serialization and Deserialization (XML, binary, and SOAP) that I've seen. I read this book from cover to cover; it is excellent.

5 stars Response to the person from Canada

2004-01-13     3 of 4 found this review helpful

In response to :
"I was hoping to find out how to code a server for a very high volume of client connections. The book explains how to use the ThreadPool, but that is only good for up to 25 clients per CPU..."

Actually, there is a technique to handle hundreds of clients, but the way to communicate with them all requires them all to be in an array. Then, like in a merge sort algorithm, divide and conquer with separate threads working on each division, sending and receiving data. If you think this out, it would end up becoming a pretty well optimized way to handle this amount of workload. Hope that helped.

5 stars One of the best books on network programming

2003-11-17     2 of 3 found this review helpful

I was always enthusiatic to read a good book on solid network programming which is also easy to understand. 'C# network programming' is a wonderful resource to understand many topics in socket programming. The C#.Net implementations are simple to understand. The book is well organized. Worth reading.

5 stars Excellent coverage of the basics of network programming

2003-07-23     2 of 2 found this review helpful

The author takes a bottom-up approach and gave a nice treatment on the underlying details of how TCP/IP networks operate, and then (almost) seamlessly moved up to how to write actual programs to handle common network related tasks, in C#.

The examples are concise and to the point. Richard definitely gave a lot of thought to the structure of contents, and whenever I have some concern about a subject, an answer is often given right in the next paragraph.

(There are just a couple typos but most of them are quite apparent and do not pose a source of confusion.)

5 stars Doesn't get better than this

2004-12-04     1 of 2 found this review helpful

One of the best programming books I've ever read ... PERIOD.

Very clear and laid out. If you know a little C# and have an interest in writing a network program to send, receive or test network connections, you can't do better than this book.

Good Work!

5 stars Great book for both beginner and advanced

2003-08-14     1 of 1 found this review helpful

I'm a computer science student as well as professional developer. I bought this book for a school project and immediately read almost the entire thing. The way that Mr. Blum describes and takes you through networking from simple to advanced is very helpful and explanatory. He describes the way networking was originally done in the socket paradigm on Unix and translates that into the object oriented world of C#. He explains how you can make the best use of the C# helper classes to make network programming much less painful. Thanks for a great book.

5 stars Very good book

2006-04-12     0 of 0 found this review helpful

if you allready have some c# experience this books is the next step u need for jump into the network programming... the books compile the 99% on vs 2005 and the examples are clear, they left no doubt when you are reading, if you want to invest some money on learning this is one way you can do it.

3 stars No advance examples / codes

2003-09-23     0 of 0 found this review helpful

There's a serious problem in chapter 07 where the author illustrates how you would transfer binary data over the network.

Any primitive data longer than 1 byte should be converted to network byte order before sending to the network. This fact is also mentioned by the author but nowhere in all the example codes explicitly do this conversion. Thus all the example codes are incorrect. This is very important because 99.9% of people developing software in C# will be running a little endian machine. I wonder if the author ever try to use his software to communicate with other software running in big-endian computers.

Also, most of the examples are too simple for the experienced developers. I'd expect more from this book.

4 stars Good book for learning TCP/IP programming

2003-01-20     0 of 0 found this review helpful

This is a good book for learning network programming especially from Microsoft .NET viewpoint. The book has extensive coverage of Sockets which is the standard API for programming with TCP/IP. I am teaching a new course on Internet Protocols and Client-Server Programming and I am thinking of adopting the book as a reference for the programming labs we do in the course. I have few minor shortcomings on the book which I will pass to the author directly but overall the book is very good.

Buy it from AmazonNew for $40.43