int tsmAllocReadNextTile ( TsmConnection connect, TsmTileHeader **tileHeader, uchar **tileBuffer ) Read the next tile from server
Read the next tile from server.This function performs the same action as tsmReadNextTile, except that it allocates the memory for the tile header and buffer inside the function. You must therefore pass pointers to the tile header/buffer pointers, so that the allocated memory addresses can be filled in for you. You free the memory that has been returned using the tsmFreeTileHeader and tsmFreeTileBuffer functions as usual.
If this function returns a value of FALSE or TSM_NODATA, then there is no memory to be freed, so always check the return code!
Using this function allows for future internal extensions to tsmApi that can efficiently cache a number of tile headers and buffers for you to use in a threaded application.
You can set the TSM_DONT_READ_TILES setting to TRUE using tsmSet and this function will perform no disk or network access. This may be useful for assessing your application's computational overhead.