GLOBUS_XIO_DATA_DESCRIPTOR_CNTL(3)

πŸ“¦
version 6.6 Β· 5 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

builtins/http/globus_xio_http.h β€” bestie, this is the Globus XIO HTTP Driver Header. That's the whole vibe. It's the header file, the manual page for it lives in the Library Functions Manual, and we're about to go through every single thing in it together. πŸ¦‹


✨ SYNOPSIS ✨

#include 'globus_xio.h'

🌸 Data Structures 🌸

  • struct globus_xio_http_header_t β€” one (1) HTTP Header. That's it, that's the struct. πŸ’…

πŸŽ€ Enumerations πŸŽ€

The enum lineup, no cap, every member accounted for:

enum globus_xio_http_handle_cmd_t {
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION,
    GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY,
    GLOBUS_XIO_HTTP_HANDLE_SET_REQUEST_HEADER }
enum globus_xio_http_attr_cmd_t {
    GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD,
    GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION,
    GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER,
    GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER,
    GLOBUS_XIO_HTTP_GET_REQUEST, GLOBUS_XIO_HTTP_GET_RESPONSE }
enum globus_xio_http_errors_t { GLOBUS_XIO_HTTP_ERROR_INVALID_HEADER,
    GLOBUS_XIO_HTTP_ERROR_PARSE, GLOBUS_XIO_HTTP_ERROR_NO_ENTITY,
    GLOBUS_XIO_HTTP_ERROR_EOF,
    GLOBUS_XIO_HTTP_ERROR_PERSISTENT_CONNECTION_DROPPED }
enum globus_xio_http_version_t {  }
heads up bestie: that last one, globus_xio_http_version_t, is literally empty in here. Nothing between the braces. I'm not gonna pretend otherwise, that's just what it is. πŸ’€

πŸ‘‘ Functions πŸ‘‘

These are the overloaded globus_xio_*_cntl calls, and yes they're all globus_result_t, because of course they are:

globus_result_t globus_xio_handle_cntl (handle, driver,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER, const char *header_name,
    const char *header_value)
globus_result_t globus_xio_handle_cntl (handle, driver,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE, int status)
globus_result_t globus_xio_handle_cntl (handle, driver,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE, const char
    *reason)
globus_result_t globus_xio_handle_cntl (handle, driver,
    GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION,
    globus_xio_http_version_t version)
globus_result_t globus_xio_handle_cntl (handle, driver,
    GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY)
globus_result_t globus_xio_attr_cntl (attr, driver,
    GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD, const char *method)
globus_result_t globus_xio_attr_cntl (attr, driver,
    GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION,
    globus_xio_http_version_t version)
globus_result_t globus_xio_attr_cntl (attr, driver,
    GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER, const char *header_name,
    const char *header_value)
globus_result_t globus_xio_attr_cntl (attr, driver,
    GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER)
globus_result_t globus_xio_data_descriptor_cntl (dd, driver,
    GLOBUS_XIO_HTTP_GET_REQUEST, char **method, char **uri,
    globus_xio_http_version_t *http_version, globus_hashtable_t
    *headers)
globus_result_t globus_xio_data_descriptor_cntl (dd, driver,
    GLOBUS_XIO_HTTP_GET_RESPONSE, int *status_code, char
    **reason_phrase, globus_xio_http_version_t *http_version,
    globus_hashtable_t *headers)

🌈 Detailed Description 🌈

Globus XIO HTTP Driver Header. That's the whole detailed description, bestie. Short, sweet, iconic. ✨


🫢 Function Documentation 🫢

globus_result_t globus_xio_attr_cntl (attr , driver , GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER )

So real talk β€” this is an overloaded member function, provided for convenience, and it differs from the above function only in what argument(s) it accepts.

Delay writing HTTP request until first data write.

Okay so here's the tea β˜•: if this attribute is present when you're opening an HTTP handle, the HTTP request will not be sent right away when the handle opens. Nope. It gets delayed until the first data write happens. And why do we care? Because that lets other HTTP headers be sent after the handle is opened. Main character scheduling energy, honestly. πŸ’…

This attribute cntl takes no arguments.


globus_result_t globus_xio_data_descriptor_cntl (dd , driver , GLOBUS_XIO_HTTP_GET_REQUEST , char ** method, char ** uri, globus_xio_http_version_t * http_version, globus_hashtable_t * headers)

Again: overloaded member function, provided for convenience, differing from the above function only in what argument(s) it accepts. And what it does is Get HTTP Request Information. πŸ”

It returns values concerning the HTTP request in the parameters you pass in. And listen β€” any of those parameters can be NULL if your application isn't interested in that part of the info. No pressure, you don't have to want all of it. πŸ™ˆ

Parameters

  • method β€” a pointer that gets set to the HTTP request method (typically GET, PUT, or POST). Important: the caller must not access this value outside of the lifetime of the data descriptor, and must not free it.
  • uri β€” a pointer that gets set to the requested HTTP path. Same rules bestie: the caller must not access this value outside of the lifetime of the data descriptor, and must not free it.
  • http_version β€” a pointer that gets set to the HTTP version used for this request.
  • headers β€” a pointer that gets set to point to a hashtable of globus_xio_http_header_t values, keyed by the HTTP header names. The caller must not access this value outside of the lifetime of the data descriptor, and must not free it or any values in it.

globus_result_t globus_xio_data_descriptor_cntl (dd , driver , GLOBUS_XIO_HTTP_GET_RESPONSE , int * status_code, char ** reason_phrase, globus_xio_http_version_t * http_version, globus_hashtable_t * headers)

Yep, another overloaded member function, provided for convenience, and it differs from the above function only in what argument(s) it accepts. This one is Get HTTP Response Information. πŸ’Œ

It returns values concerning the HTTP response in the parameters you hand it. And again β€” any of the parameters may be NULL if the application isn't interested in that part of the information.

Parameters

  • status_code β€” a pointer that gets set to the HTTP response status code (such as 404), as per RFC 2616. The caller must not access this value outside of the lifetime of the data descriptor, and must not free it or any values in it.
  • reason_phrase β€” a pointer that gets set to the HTTP response reason phrase (such as Not Found). The caller must not access this value outside of the lifetime of the data descriptor, and must not free it or any values in it.
  • http_version β€” a pointer that gets set to the HTTP version used for this request.
  • headers β€” a pointer that gets set to point to a hashtable of globus_xio_http_header_t values, keyed by the HTTP header names. The caller must not access this value outside of the lifetime of the data descriptor, and must not free it or any values in it.
fr fr, memorize the "must not free" rules. They show up four separate times in this page for a reason. That memory is not yours to touch. 🚫

⭐ Author ⭐

Generated automatically by Doxygen for globus_xio from the source code. Not a human, just Doxygen doing its lil thing. πŸ€–βœ¨


okay and that's the whole page, bestie!! This was globus_xio, Version 6.6, from the globus_xio source β€” mwah, slay, go forth and set your headers responsibly. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from