globus_net...er_context(3)

πŸ“¦
version 1.7 Β· 6 versions
, in fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– globus_net_manager_context β€” Library Functions Manual πŸ’–

okay bestie, so this is globus_net...er_context(3) and it's giving very important library-functions-manual energy. grab a lil snack, we're getting into it πŸ“


✨ NAME ✨

globus_net_manager_context β€” Context

  • Net Manager Context Management Functions.

lowkey that's the whole vibe: it's the thing that manages your net manager context. periodt. πŸ’…


🌸 SYNOPSIS 🌸

Typedefs

  • typedef struct globus_i_net_manager_context_s * globus_net_manager_context_t β€” Net Manager Context.

Functions

  • void globus_net_manager_context_destroy (globus_net_manager_context_t context) β€” Destroy Context.
  • globus_result_t globus_net_manager_context_end_listen (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const globus_net_manager_attr_t *attr_array) β€” Call Context End Listen.
  • globus_result_t globus_net_manager_context_init (globus_net_manager_context_t *context, const globus_net_manager_attr_t *attrs) β€” Initialize Context.
  • globus_result_t globus_net_manager_context_post_accept (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const char *remote_contact, const globus_net_manager_attr_t *attr_array, globus_net_manager_attr_t **attr_array_out) β€” Call Context Post Accept.
  • globus_result_t globus_net_manager_context_post_close (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const char *remote_contact, const globus_net_manager_attr_t *attr_array) β€” Call Context Post Close.
  • globus_result_t globus_net_manager_context_post_connect (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const char *remote_contact, const globus_net_manager_attr_t *attr_array, globus_net_manager_attr_t **attr_array_out) β€” Call Context Post Connect.
  • globus_result_t globus_net_manager_context_post_listen (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const globus_net_manager_attr_t *attr_array, char **local_contact_out, globus_net_manager_attr_t **attr_array_out) β€” Call Context Post Listen.
  • globus_result_t globus_net_manager_context_pre_accept (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const globus_net_manager_attr_t *attr_array, globus_net_manager_attr_t **attr_array_out) β€” Call Context Pre Accept.
  • globus_result_t globus_net_manager_context_pre_close (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *local_contact, const char *remote_contact, const globus_net_manager_attr_t *attr_array) β€” Call Context Pre Close.
  • globus_result_t globus_net_manager_context_pre_connect (globus_net_manager_context_t context, const char *task_id, const char *transport, const char *remote_contact, const globus_net_manager_attr_t *attr_array, char **remote_contact_out, globus_net_manager_attr_t **attr_array_out) β€” Call Context Pre Connect.
  • globus_result_t globus_net_manager_context_pre_listen (globus_net_manager_context_t context, const char *task_id, const char *transport, const globus_net_manager_attr_t *attr_array, globus_net_manager_attr_t **attr_array_out) β€” Call Context Pre Listen.

πŸ¦‹ Detailed Description πŸ¦‹

Net Manager Context Management Functions.

okay so picture this: the Net Manager Context is literally the girlboss manager of a whole collection of network manager plug-ins, and those plug-ins get called whenever network events happen. it's giving backstage crew for a concert, fr fr. πŸ‘‘

you initialize the context by calling globus_net_manager_context_init(). this one processes an array of attributes. the "scope" member of of attributes indicates the name of a network manager to associate with the context. (yes bestie, "of of" is in the original, i'm not fixing the source's typos, that's not my job πŸ’€). the (name, value) tuples of the attributes get added to the attributes passed to all of that particular network manager's implementation functions.

once the network manager context is created, you pass it to the per-operation invocation functions to trigger all of the manager callouts associated with the context. no cap.

and when the network manager context is no longer needed? you destroy it by calling globus_net_manager_context_destroy(). bye bestie 🫢


πŸŽ€ Typedef Documentation πŸŽ€

typedef struct globus_i_net_manager_context_s* globus_net_manager_context_t

Net Manager Context. A structure of this type is used to thread attributes through the set of configured net manager modules and invoke their functions in configuration order.

so like, this lil struct is the messenger 🧚 that carries your attributes through all the configured net manager modules, and it invokes their functions in configuration order. the order matters, iykyk.


πŸ”₯ Function Documentation πŸ”₯

void globus_net_manager_context_destroy (globus_net_manager_context_t context)

Destroy Context. This functions destroys context.

Parameters

  • context β€” Pointer to the context to destroy.

it literally does what it says on the tin, bestie. context goes in, context is no more. πŸ’€βœ¨


globus_result_t globus_net_manager_context_end_listen (globus_net_manager_context_t context, const char * task_id, const char * transport, const char * local_contact, const globus_net_manager_attr_t * attr_array)

Call Context End Listen. Call the chain of end_listen() functions in a context with the given task_id, transport, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

Parameters

  • context β€” The context to call functions in.
  • task_id β€” The task_id associated with this network operation.
  • transport β€” The transport driver associated with this network operation.
  • local_contact β€” The string representation of the local address of the socket.
  • attr_array β€” The set of attributes to pass to the managers.

Returns

On success, this function returns GLOBUS_SUCCESS. If any manager returns an error, the end_listen calls stop and the error is returned to the caller.

lowkey important: the second one manager trips, the whole chain stops. no passing go, no collecting two hundred dollars. 😭

globus_result_t globus_net_manager_context_init (globus_net_manager_context_t * context, const globus_net_manager_attr_t * attrs)

Initialize Context. This functions initializes context with the attribute list attrs.

Parameters

  • context β€” A pointer to the context to initialize.
  • attrs β€” An array of attributes to initialize the context with.

Returns

On error, the 'context' is set to NULL and this function returns an error object. Otherwise this function returns 'GLOBUS_SUCCESS'

so if it flops, your context pointer becomes NULL and you get an error object back. if it slays, you get 'GLOBUS_SUCCESS'. πŸ’–


globus_result_t globus_net_manager_context_post_accept (globus_net_manager_context_t context, const char * task_id, const char * transport, const char * local_contact, const char * remote_contact, const globus_net_manager_attr_t * attr_array, globus_net_manager_attr_t ** attr_array_out)

Call Context Post Accept. Call the chain of post_accept() functions in a context with the given task_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called. The attributes are chained through all the calls, with any changed values returned from a manager passed to subsequent managers in the chain.

Parameters

  • context β€” The context to call functions in.
  • task_id β€” The task_id associated with this network operation.
  • transport β€” The transport driver associated with this network operation.
  • local_contact β€” The string representation of the local address of the socket.
  • remote_contact β€” The string representation of the remote address of the socket.
  • attr_array β€” The set of attributes to pass to the managers.
  • attr_array_out β€” The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

Returns

On success, this function returns GLOBUS_SUCCESS. If any manager returns an error, the post_accept calls stop and the error is returned to the caller.

the way that the attributes get passed down the chain like a lil game of telephone, and any changed values get handed to the next manager β€” that's the tea. β˜• and if nobody changed anything, attr_array_out just becomes NULL. simple as.


globus_result_t globus_net_manager_context_post_close (globus_net_manager_context_t context, const char * task_id, const char * transport, const char * local_contact, const char * remote_contact, const globus_net_manager_attr_t * attr_array)

Call Context Post Close. Call the chain of post_close() functions in a context with the given task_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

Parameters

  • context β€” The context to call functions in.
  • task_id β€” The task_id associated with this network operation.
  • transport β€” The transport driver associated with this network operation.
  • local_contact β€” The string representation of the local address of the socket.
  • remote_contact β€” The string representation of the remote address of the socket
  • attr_array β€” The set of attributes to pass to the managers.

Returns

On success, this function returns GLOBUS_SUCCESS. If any manager returns an error, the post_close calls stop and the error is returned to the caller.

ngl notice there's no *_out on this one β€” it's a close, bestie, we're just wrapping up, no attribute glow-up required. πŸŽ€

globus_result_t globus_net_manager_context_post_connect (globus_net_manager_context_t context, const char * task_id, const char * transport, const char * local_contact, const char * remote_contact, const globus_net_manager_attr_t * attr_array, globus_net_manager_attr_t ** attr_array_out)

Call Context Post Connect. Call the chain of post_connect() functions in a context with the given task_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

Parameters

  • context β€” The context to call functions in.
  • task_id β€” The task_id associated with this network operation.
  • transport β€” The transport driver associated with this network operation.
  • local_contact β€” The string representation of the local address of the socket.
  • remote_contact β€” The string representation of the remote address of the socket.
  • attr_array β€” The set of attributes to pass to the managers.
  • attr_array_out β€” The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

Returns

On success, this function returns GLOBUS_SUCCESS. If any manager returns an error, the post_connect calls stop and the error is returned to the caller.

periodt. same chain rules, same GLOBUS_SUCCESS happy ending, same NULL attr_array_out if nobody touched the attributes. πŸ’…


globus_result_t globus_net_manager_context_post_listen (globus_net_manager_context_t context, const char * task_id, const char * transport, const char * local_contact, const globus_net_manager_attr_t * attr_array, char ** local_contact_out, globus_net_manager_attr_t ** attr_array_out)

Call Context Post Listen. Call the chain of post_listen() functions in a context with the given task_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

Parameters

  • context β€” the context to call functions in πŸ’œ
  • task_id β€” the task_id that's attached to this network operation
  • transport β€” the transport driver that's attached to this network operation
  • local_contact β€” the string representation of the socket's local address πŸ“
  • attr_array β€” the set of attributes you're handing off to the managers
  • local_contact_out β€” the resulting local contact that comes back from the managers. This gets set to NULL if no manager modifies the local contact β€” like, nobody touched it, so nothing to report πŸ«₯
  • attr_array_out β€” the resulting set of attributes from the managers. Also NULL if no manager modifies the attributes, same deal

Returns

On success you get GLOBUS_SUCCESS back πŸŽ€. But if any manager returns an error, the post_listen() calls stop right there and that error comes straight back to the caller. No vibes, just the error, fr fr. 😭


✨ globus_net_manager_context_pre_accept ✨

globus_result_t globus_net_manager_context_pre_accept
    (globus_net_manager_context_t context, const char * task_id, const char
     * transport, const char * local_contact, const globus_net_manager_attr_t
     * attr_array, globus_net_manager_attr_t ** attr_array_out)

Okay so this one is Call Context Pre Accept πŸ’… β€” it walks the chain of pre_accept() functions in a context, passing along the given task_id, transport, contact info and attributes. And listen: if any manager in the context returns an error, the managers after it do not get called. It's a chain, bestie, and it snaps. πŸ’€

Parameters

  • context β€” the context to call functions in πŸ’œ
  • task_id β€” the task_id for this network operation
  • transport β€” the transport driver for this network operation
  • local_contact β€” the string representation of the socket's local address
  • attr_array β€” the set of attributes passed to the managers
  • attr_array_out β€” the resulting attributes from the managers. NULL if no manager modifies them

Returns

GLOBUS_SUCCESS on success, bestie ✨. If any manager errors out, the pre_accept() calls stop and you get the error handed right back to you.


🌸 globus_net_manager_context_pre_close 🌸

globus_result_t globus_net_manager_context_pre_close
    (globus_net_manager_context_t context, const char * task_id, const char
     * transport, const char * local_contact, const char * remote_contact,
     const globus_net_manager_attr_t * attr_array)

Call Context Pre Close πŸŽ€ β€” runs the chain of pre_close() functions in a context with the task_id, transport, contact info and attributes you give it. And yep, same rule: if any manager returns an error, the ones after it don't get called. Periodt. πŸ’…

Parameters

  • context β€” the context to call functions in πŸ’œ
  • task_id β€” the task_id for this network operation
  • transport β€” the transport driver for this network operation
  • local_contact β€” the string representation of the socket's local address
  • remote_contact β€” the string representation of the socket's remote address πŸ›°οΈ
  • attr_array β€” the set of attributes passed to the managers

Returns

GLOBUS_SUCCESS when it works 🫢. If any manager returns an error, the pre_close() calls stop and that error bounces back to the caller.


πŸ¦‹ globus_net_manager_context_pre_connect πŸ¦‹

globus_result_t globus_net_manager_context_pre_connect
    (globus_net_manager_context_t context, const char * task_id, const char
     * transport, const char * remote_contact, const
     globus_net_manager_attr_t * attr_array, char ** remote_contact_out,
     globus_net_manager_attr_t ** attr_array_out)

Call Context Pre Connect 🌈 β€” fires off the chain of pre_connect() functions in a context with the task_id, transport, contact info and attributes. And again, one manager errors and the rest just don't get called. It's giving "we're done here". 😀

Parameters

  • context β€” the context to call functions in πŸ’œ
  • task_id β€” the task_id for this network operation
  • transport β€” the transport driver for this network operation
  • remote_contact β€” the string representation of the socket's remote address πŸ›°οΈ
  • attr_array β€” the set of attributes passed to the managers
  • remote_contact_out β€” the resulting string representation of the remote address. Set to NULL if no manager modifies the address β€” untouched, unbothered ✨
  • attr_array_out β€” the resulting attributes from the managers. NULL if no manager modifies them

Returns

GLOBUS_SUCCESS on success, mwah πŸ’‹. If any manager returns an error, the pre_connect() calls stop and the error comes back to the caller.


πŸŽ€ globus_net_manager_context_pre_listen πŸŽ€

globus_result_t globus_net_manager_context_pre_listen
    (globus_net_manager_context_t context, const char * task_id, const char
     * transport, const globus_net_manager_attr_t * attr_array,
     globus_net_manager_attr_t ** attr_array_out)

Call Context Pre Listen πŸ‘‘ β€” runs the chain of pre_listen() functions in a context with the given task_id, transport, contact info and attributes. And yes bestie, the rule holds: any manager returns an error and the subsequent managers do not get called. Iconic behaviour honestly. πŸ’…

Parameters

  • context β€” the context to call functions in πŸ’œ
  • task_id β€” the task_id for this network operation
  • transport β€” the transport driver for this network operation
  • attr_array β€” the set of attributes passed to the managers
  • attr_array_out β€” the resulting attributes from the managers. NULL if no manager modifies them

Returns

GLOBUS_SUCCESS when everything goes off without a hitch 🌟. If any manager returns an error, the pre_listen() calls stop and that error gets returned to the caller.


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for globus_net_manager from the source code. So basically a robot wrote this entire thing and honestly? it ate. πŸ€–βœ¨


and that's the whole page, bestie!! 🫢 the footer tells us the source is globus_net_manager and the version is 1.7 β€” it doesn't stamp a date on there so that part stays a lil mysterious 🌸 β€” and it lives in section 3 of the manual, so like, globus_net...er_context(3), iykyk πŸ’… go forth and manage your network contexts, you got this πŸ’–πŸ¦‹

πŸ“¦ where this page comes from