![]() |
How to Avoid the Top 10 Sockets Programming ErrorsA white paper for software development managers |
Today’s trade journals are full of stories about the latest hot trends and technologies. SOA. Web services. AJAX. These are cool – if you’re a Web programmer. But if you’re like most senior software developers or managers we’ve worked with, the real workhorse in your applications and systems is plain old Sockets – the low-level connections that link applications running on a network (i.e.: winsock or Windows sockets, bsd sockets, linux sockets, or tcp sockets). Your systems move financial data, audio/video, patient health information, billing records – pretty much anything and everything, text or binary. Lots of data must move efficiently with nary a Web server in sight. You may need to run on Windows, Linux, and UNIX across different hardware types and sizes from data center servers and desktops to handheld devices and embedded hardware. Given the demands of today’s business world, everything had better work right, all the time. If a mistake happens or your system crashes, your business not only loses money – its hard-earned reputation for quality also suffers, and you personally are on the hot seat for the mistake. This white paper will show you the 10 most common errors developers make when programming Sockets – especially Winsock run time errors! -- and how you can avoid them. The 10 Most Common Sockets Programming ErrorsMuch of the cost of software development is in the testing and maintenance (fixing the bugs) stages. Although developers know about socket programming and run-time errors and where they’re most likely to occur, it’s proven very difficult to avoid certain classes of Socket programming errors -- and those commonly encountered when programming Sockets for applications such as Windows, Linux, or Unix are among the thorniest. Why is this? The reasons Sockets programming is very error-prone can be grouped into three categories:
To top it off, most of the Socket errors can’t be caught by the compiler, forcing developers to find and resolve these errors during testing, a far more costly effort than if the errors could be detected at compile time. As an illustration, consider the following simple function. This code will successfully compile and link on most systems, yet it contains the ten most commonly made Sockets errors. Can you identify them? Like what you’ve read so far? If you would like to read this Sockets Programming Errors white paper in its entirety, simply fill out the brief form below. You’ll be taken to a new page that includes a link to the white paper PDF. |
Winsock Error Example11 int n_handle; Use of nonportable handle datatype About Riverace CorporationRiverace Corporation is the premier provider of ACE – the ADAPTIVE Communication Environment. A modern, high-performance framework and C++ class library, the ACE toolkit offers classes designed to resolve the complexities inherent in Sockets programming. And, ACE is easily portable to a wide range of today’s popular computing programs – from handheld devices to supercomputers. |