src/inc/udc.h 1.16
1.16 2009/11/13 06:42:43 angie
Use net.c's new support for open-ended byterange and sockets that stay open, so that we can read successive data blocks from the same socket, instead of reconnecting to the remote server for each successive chunk. This dramatically improves the performance of udcFuse on block-compressed data. Refactored to reduce code duplication between ftp and http fetchData methods, and keep private struct & methods out of udc.h. Added checking of return value from fetchData; we were just writing a bunch of 0's to sparseData when fetchData returned fewer bytes than we asked for [error while debugging net.c], which resulted in corrupt sparseData file.
Index: src/inc/udc.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/udc.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -B -U 4 -r1.15 -r1.16
--- src/inc/udc.h 6 Nov 2009 22:42:06 -0000 1.15
+++ src/inc/udc.h 13 Nov 2009 06:42:43 -0000 1.16
@@ -94,32 +94,8 @@
/* Prefix used by convention to indicate a file should be accessed via udc. This is
* followed by the local path name or a url, so in common practice you see things like:
* udc:http://genome.ucsc.edu/goldenPath/hg18/tracks/someTrack.bb */
-struct udcRemoteFileInfo
-/* Information about a remote file. */
- {
- bits64 updateTime; /* Last update in seconds since 1970 */
- bits64 size; /* Remote file size */
- };
-
-boolean udcInfoViaHttp(char *url, struct udcRemoteFileInfo *retInfo);
-/* Gets size and last modified time of URL
- * and returns status of HEAD GET. */
-
-int udcDataViaHttp(char *url, bits64 offset, int size, void *buffer);
-/* Fetch a block of data of given size into buffer using the http: protocol.
- * Returns number of bytes actually read. Does an errAbort on
- * error. Typically will be called with size in the 8k - 64k range. */
-
-int udcDataViaFtp(char *url, bits64 offset, int size, void *buffer);
-/* Fetch a block of data of given size into buffer using the ftp: protocol.
- * Returns number of bytes actually read. Does an errAbort on
- * error. Typically will be called with size in the 8k - 64k range. */
-
-boolean udcInfoViaFtp(char *url, struct udcRemoteFileInfo *retInfo);
-/* Gets size and last modified time of FTP URL */
-
struct slName *udcFileCacheFiles(char *url, char *cacheDir);
/* Return low-level list of files used in cache. */
char *udcPathToUrl(const char *path, char *buf, size_t size, char *cacheDir);