gtpc1m2eTransmission Control Protocol/Internet Protocol

Using Existing Socket Applications

Socket applications that were developed and run by using TCP/IP offload support will run using TCP/IP native stack support. The new code is designed to be backward compatible. There are additional socket options and a new API call supported now, but your application has to code these new options for them to work.

You can use the newly supported socket options to make your application more effective. For example, if your existing applications previously needed a timeout capability when reading data, you had to code a select for read API function before each read API function. With TCP/IP native stack support, the read function now has a timeout capability; therefore, you can delete the select for read calls in your application and use the read timeout capability instead. This decreases the number of socket API calls issued, can cause data to be delivered faster to your application, and can decrease the number of times the data is copied.

Server applications that needed the timeout capability were also forced to code a select for read API function before their accept call. The select call is no longer needed for this because accept now has a timeout capability.

Another example would be for TCP applications that receive large messages. Your existing applications probably issue multiple read API calls and receive the message a small piece at a time, and the application has to put the message back together. Because the receive low-water mark socket option is now supported, you can have the TCP/IP native stack support code put the pieces of the message back together and then deliver the entire message to your application on a single read API call. This again reduces the number of socket API calls issued.