4#ifndef SPRKL_TRANSPORT_H
5#define SPRKL_TRANSPORT_H
Request tagged union.
Definition request.h:74
Response tagged union (varies on the associated request verb and status).
Definition request.h:84
Generic transport vtable.
Definition transport.h:15
int(* sendrequest)(struct sprkl_transport *, struct sprkl_request *)
Sends a request through the transport.
Definition transport.h:21
int(* recvresponse)(struct sprkl_transport *, struct sprkl_response *)
Waits for and receives a response through the transport.
Definition transport.h:37
int(* recvrequest)(struct sprkl_transport *, struct sprkl_request *)
Waits for and receives a request through the transport.
Definition transport.h:26
int(* sendresponse)(struct sprkl_transport *, struct sprkl_response *)
Sends a response through the transport.
Definition transport.h:31
void * opaque
Instance-specific data.
Definition transport.h:16
void sprkl_transport_fini_default(struct sprkl_transport *transport)
Finalises the default transport.
Definition transport.c:101
int sprkl_transport_sendrequest(struct sprkl_transport *t, struct sprkl_request *request)
Sends a request via the given transport.
Definition transport.c:11
int sprkl_transport_recvresponse(struct sprkl_transport *t, struct sprkl_response *response)
Receives a response via the given transport.
Definition transport.c:26
int sprkl_transport_make_default(struct sprkl_transport *transport)
Creates the platform's default transport, usually configured by environment variable(s).
Definition transport.c:82
int sprkl_transport_sendresponse(struct sprkl_transport *t, struct sprkl_response *response)
Sends a response via the given transport.
Definition transport.c:21
char * sprkl_transport_strerror(struct sprkl_transport *t, int error)
Converts a transport-defined error number to a string description.
Definition transport.c:31
int sprkl_transport_recvrequest(struct sprkl_transport *t, struct sprkl_request *request)
Receives a request via the given transport.
Definition transport.c:16