An API for Internet Auctions
By Kevin O'Malley and Terence Kelly
Dr. Dobb's Journal September 1998
<b>(a)</b> // recvBuf sent from the server = "auth?id=1234&status=0" APIStringData msg(recvBuf); char *p = msg.Find("status"); assert(p != NULL); char *p = msg.Find("id"); assert(p != NULL); <b>(b)</b> APIStringMsg reply; reply.AddOpType("auth"); reply.AddTerm("id", 1234); reply.AddTerm("status", NO_API_ERR);
Example 3: Example of classes: (a) APIStringData; (b) APIStringMsg.
Copyright © 1998, Dr. Dobb's Journal