![]() |
Home | Documentation |
gsoapWinInet.cpp File Reference
updated Thu Oct 26 2017 by Robert van Engelen
|
#include "gsoapWinInet.h"
Classes | |
| struct | wininet_data |
Macros | |
| #define | _ASSERTE(b) |
| #define | UNUSED_ARG(x) (x) |
| #define | INVALID_BUFFER_LENGTH ((DWORD)-1) |
| #define | wininet_free_error_message(x) |
Functions | |
| static BOOL | wininet_init (struct soap *soap, struct wininet_data *a_pData, DWORD a_dwRequestFlags) |
| static int | wininet_copy (struct soap *soap, struct soap_plugin *a_pDst, struct soap_plugin *a_pSrc) |
| static void | wininet_delete (struct soap *soap, struct soap_plugin *a_pPluginData) |
| static SOAP_SOCKET | wininet_connect (struct soap *soap, const char *a_pszEndpoint, const char *a_pszHost, int a_nPort) |
| static int | wininet_post_header (struct soap *soap, const char *a_pszKey, const char *a_pszValue) |
| static int | wininet_fsend (struct soap *soap, const char *a_pBuffer, size_t a_uiBufferLen) |
| static size_t | wininet_frecv (struct soap *soap, char *a_pBuffer, size_t a_uiBufferLen) |
| static int | wininet_disconnect (struct soap *soap) |
| void CALLBACK | wininet_callback (HINTERNET hInternet, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInformation, DWORD dwStatusInformationLength) |
| static BOOL | wininet_have_connection (struct soap *soap, struct wininet_data *a_pData) |
| static DWORD | wininet_set_timeout (struct soap *soap, struct wininet_data *a_pData, const char *a_pszTimeout, DWORD a_dwOption, int a_nTimeout) |
| static BOOL | wininet_resolve_send_error (HINTERNET a_hHttpRequest, DWORD a_dwErrorCode) |
| int | wininet_plugin (struct soap *soap, struct soap_plugin *a_pPluginData, void *a_dwRequestFlags) |
| void | wininet_set_rse_callback (struct soap *soap, wininet_rse_callback a_pRsecallback) |
Variables | |
| static const char | wininet_id [] = "wininet-2.1" |
| #define _ASSERTE | ( | b | ) |
| #define INVALID_BUFFER_LENGTH ((DWORD)-1) |
| #define UNUSED_ARG | ( | x | ) | (x) |
| #define wininet_free_error_message | ( | x | ) |
| void CALLBACK wininet_callback | ( | HINTERNET | hInternet, |
| DWORD_PTR | dwContext, | ||
| DWORD | dwInternetStatus, | ||
| LPVOID | lpvStatusInformation, | ||
| DWORD | dwStatusInformationLength | ||
| ) |
this is mostly for debug tracing
|
static |
Called from a client proxy to open a connection to a Web Service located at endpoint. Input parameters host and port are micro-parsed from endpoint. Should return a valid file descriptor, or SOAP_INVALID_SOCKET and soap->error set to an error code. Built-in gSOAP function: tcp_connect
|
static |
copy the private data structure's parameters
|
static |
deallocate of our private structure
|
static |
Called by client proxy multiple times, to close a socket connection before a new socket connection is established and at the end of communications when the SOAP_IO_KEEPALIVE flag is not set and soap.keep_alive = 0 (indicating that the other party supports keep alive). Should return SOAP_OK, or a gSOAP error code. Built-in gSOAP function: tcp_disconnect
|
static |
Called for all receive operations to fill buffer s of maximum length n. Should return the number of bytes read or 0 in case of an error, e.g. EOF. Built-in gSOAP function: frecv
|
static |
Called for all send operations to emit contents of s of length n. Should return SOAP_OK, or a gSOAP error code. Built-in gSOAP function: fsend
Notes: I do a heap of buffering here because we need the entire message available in a single buffer in order to iterate through the sending loop. I had hoped that the SOAP_IO_STORE flag would have worked to do the same, however this still breaks the messages up into blocks. Although there were a number of ways this could've been implemented, this works and supports all of the possible SOAP_IO flags, even though the entire message is still buffered the same as if SOAP_IO_STORE was used.
|
static |
check to ensure that our connection hasn't been disconnected and disconnect remaining handles if necessary.
|
static |
initialize private data
| int wininet_plugin | ( | struct soap * | soap, |
| struct soap_plugin * | a_pPluginData, | ||
| void * | a_dwRequestFlags | ||
| ) |
plugin registration
|
static |
Called by http_post and http_response (through the callbacks). Emits HTTP key: val header entries. Should return SOAP_OK, or a gSOAP error code. Built-in gSOAP function: http_post_header.
|
static |
| void wininet_set_rse_callback | ( | struct soap * | soap, |
| wininet_rse_callback | a_pRsecallback | ||
| ) |
|
static |
|
static |
plugin id