#include <VXIinet.h>
The interface is a synchronous interface based on the ANSI/ISO C standard file I/O interface, the only exception is that pre-fetches are asynchronous. The client of the interface may use this in an asynchronous manner by using non-blocking I/O operations, creating threads, or by invoking this from a separate server process.
There is one Internet interface per thread/line.
Public Attributes | |
VXIint32(* | GetVersion )(void) |
Get the VXI interface version implemented. | |
const VXIchar *(* | GetImplementationName )(void) |
Get the name of the implementation. | |
VXIinetResult(* | Prefetch )(struct VXIinetInterface *pThis, const VXIchar *moduleName, const VXIchar *name, VXIinetOpenMode mode, VXIint32 flags, const VXIMap *properties) |
Prefetch information (non-blocking). | |
VXIinetResult(* | Open )(struct VXIinetInterface *pThis, const VXIchar *moduleName, const VXIchar *name, VXIinetOpenMode mode, VXIint32 flags, const VXIMap *properties, VXIMap *streamInfo, VXIinetStream **stream) |
Open a stream for reading or writing. | |
VXIinetResult(* | Close )(struct VXIinetInterface *pThis, VXIinetStream **stream) |
Close a previously opened stream Close a stream that was previously opened. | |
VXIinetResult(* | Read )(struct VXIinetInterface *pThis, VXIbyte *buffer, VXIulong buflen, VXIulong *nread, VXIinetStream *stream) |
Read from a stream. | |
VXIinetResult(* | Write )(struct VXIinetInterface *pThis, const VXIbyte *buffer, VXIulong buflen, VXIulong *nwritten, VXIinetStream *stream) |
Write to a stream. | |
VXIinetResult(* | SetCookieJar )(struct VXIinetInterface *pThis, const VXIVector *jar) |
Set the cookie jar. | |
VXIinetResult(* | GetCookieJar )(struct VXIinetInterface *pThis, VXIVector **jar, VXIbool *changed) |
Get the cookie jar. | |
VXIinetResult(* | GetAbsoluteName )(struct VXIinetInterface *pThis, const VXIchar *moduleName, const VXIchar *name, const VXIMap *properties, VXIString **absoluteName) |
Get absolute URI. |
|
Close a previously opened stream Close a stream that was previously opened. Closing a NULL or previously closed stream will result in an error.
|
|
Get absolute URI. To get the canonical absolute URI from a base/relative URI pair.
|
|
Get the cookie jar. The caller of VXIinet is responsible for persistent storage of the cookie jar if desired. This is done by calling SetCookieJar( ) with the caller's cookie jar at the start of each call (use an empty cookie jar if this is a new caller), then calling this function to retrieve the updated cookie jar at the end of the call for storage. When the cookie jar is returned, any expired cookies will have been deleted.
|
|
Get the name of the implementation.
|
|
Get the VXI interface version implemented.
|
|
Open a stream for reading or writing. All implementations must support opening a URL for reading using file:// or http:// access, and opening a platform dependant path for reading. All implementations must support all the flags for each of the above. For all other combinations support is implementation dependant (i.e. write for URLs and platform dependant paths). For URLs, the only accepted unsafe characters are: { } [ ] ^ ~ ' They will be escaped if only when processing a HTTP request.
|
|
Prefetch information (non-blocking). Note that this is optional, it does not need to be called prior to Open( ). Use the INET_PREFETCH_PRIORITY property to provide a hint to indicate the priority of the prefetch. Note that the implementation may opt to ignore the prefetch request (for example a low priority prefetch when the cache is already full with frequently used information).
|
|
Read from a stream. This may or not block, as determined by the flags used when opening the stream. When in non-blocking mode, partial buffers may be returned instead of blocking, or an VXIinet_RESULT_WOULD_BLOCK error is returned if no data is available at all. NOTE: VXIinet_RESULT_END_OF_STREAM may be returned even when nread is greater then 0. Example: if there are 20 more bytes remaining in a stream and the client component requests 50 bytes via Read( ), the implementation should return VXIinet_RESULT_END_OF_STREAM with nread = 20. If the client component then (incorrectly) requests 50 more bytes via Read( ), return VXIinet_RESULT_END_OF_STREAM again with nread = 0.
|
|
Set the cookie jar. The cookie jar is used to provide cookies and store cookies during future VXIinet Prefetch( ) and Open( ) operations. Expired cookies within the jar will not be used. Each time this is called the prior cookie jar is discarded, the caller is responsible for persistent storage of the cookie jar if desired. See GetCookieJar( ) for details. If SetCookieJar( ) is never called, or if it is called with a NULL jar, the VXIinet implementation will refuse to accept cookies for fetches.
|
|
Write to a stream. This may or not block, as determined by the flags used when opening the stream. When in non-blocking mode, partial writes may occur instead of blocking, or an VXIinet_RESULT_WOULD_BLOCK error is returned if no data could be written at all.
|