|
gwenhywfar 5.14.1
|

Go to the source code of this file.
Functions | |
| GWEN_SYNCIO * | GWEN_Gui_ExtendSyncIo (const char *url, const char *defaultProto, int defaultPort, GWEN_SYNCIO *baseSio) |
| int GWENHYWFAR_CB | GWEN_Gui_Internal_GetSyncIo (GWEN_UNUSED GWEN_GUI *gui, const char *url, const char *defaultProto, int defaultPort, GWEN_SYNCIO **pSio) |
| GWEN_SYNCIO * GWEN_Gui_ExtendSyncIo | ( | const char * | url, |
| const char * | defaultProto, | ||
| int | defaultPort, | ||
| GWEN_SYNCIO * | baseSio ) |
Stack sync io layers above the given base layer.
This is a convenience function to extend a base layer (e.g. created by GWEN_SyncIo_Socket_new) to support HTTP or HTTPS over the given base layer.
You can use this function to allow for e.g. HTTPS over a socket created by functions GWEN_Socket_Accept and GWEN_SyncIo_Socket_TakeOver.
The caller is responsible for freeing the object returned (if any).
| url | url to which the caller wants to connect to. You should call GWEN_Url_fromString() to get the information required to determine the protocol and destination. |
| defaultProto | default protocol name if not specified by the url (e.g. "http", "https") |
| defaultPort | default port if not specified by the url |
| baseSio | base layer to extend (e.g. created by GWEN_SyncIo_Socket_new) |
Definition at line 29 of file gui_syncio.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), GWEN_Gui_GetGui(), GWEN_LOGDOMAIN, GWEN_SyncIo_Buffered_new(), GWEN_SyncIo_free(), GWEN_SyncIo_Http_GetDbCommandOut(), GWEN_SyncIo_Http_GetDbHeaderOut(), GWEN_SyncIo_Http_new(), GWEN_SyncIo_Tls_new(), GWEN_SyncIo_Tls_SetRemoteHostName(), GWEN_Url_free(), GWEN_Url_fromString(), GWEN_Url_GetPort(), GWEN_Url_GetProtocol(), GWEN_Url_GetServer(), GWEN_Url_toCommandString(), and NULL.
Referenced by GWEN_Gui_Internal_GetSyncIo(), and GWEN_HttpSession_fromSocketPassive().


| int GWENHYWFAR_CB GWEN_Gui_Internal_GetSyncIo | ( | GWEN_UNUSED GWEN_GUI * | gui, |
| const char * | url, | ||
| const char * | defaultProto, | ||
| int | defaultPort, | ||
| GWEN_SYNCIO ** | pSio ) |
Definition at line 153 of file gui_syncio.c.
References DBG_ERROR, DBG_INFO, GWEN_AddressFamilyIP, GWEN_ERROR_GENERIC, GWEN_ERROR_INVALID, GWEN_Gui_ExtendSyncIo(), GWEN_LOGDOMAIN, GWEN_SocketTypeTCP, GWEN_SyncIo_free(), GWEN_SyncIo_Socket_new(), GWEN_SyncIo_Socket_SetAddress(), GWEN_SyncIo_Socket_SetPort(), GWEN_UNUSED, GWEN_Url_free(), GWEN_Url_fromString(), GWEN_Url_GetPort(), GWEN_Url_GetProtocol(), GWEN_Url_GetServer(), GWENHYWFAR_CB, and NULL.
Referenced by GWEN_Gui_new().

