|
libsparklepaw
PawSD library
|
Generic transport vtable. More...
#include <libsparklepaw/transport.h>
Data Fields | |
| void * | opaque |
| Instance-specific data. | |
| int(* | sendrequest )(struct sprkl_transport *, struct sprkl_request *) |
| Sends a request through the transport. | |
| int(* | recvrequest )(struct sprkl_transport *, struct sprkl_request *) |
| Waits for and receives a request through the transport. | |
| int(* | sendresponse )(struct sprkl_transport *, struct sprkl_response *) |
| Sends a response through the transport. | |
| int(* | recvresponse )(struct sprkl_transport *, struct sprkl_response *) |
| Waits for and receives a response through the transport. | |
| char *(* | strerror )(struct sprkl_transport *, int) |
| Converts an error number to a string representation. | |
Generic transport vtable.
Generally you shouldn't use the contained functions directly, instead invoke them via their wrappers, e.g. sprkl_transport_sendrequest().
| int(* sprkl_transport::recvrequest) (struct sprkl_transport *, struct sprkl_request *) |
Waits for and receives a request through the transport.
| 1 | Reference to this transport itself. |
| 2 | Empty request object to fill the data into. |
| int(* sprkl_transport::recvresponse) (struct sprkl_transport *, struct sprkl_response *) |
Waits for and receives a response through the transport.
| 1 | Reference to this transport itself. |
| 2 | Empty response object to fill the data into. (verb preset by caller) |
| int(* sprkl_transport::sendrequest) (struct sprkl_transport *, struct sprkl_request *) |
Sends a request through the transport.
| 1 | Reference to this transport itself. |
| 2 | The request to send. |
| int(* sprkl_transport::sendresponse) (struct sprkl_transport *, struct sprkl_response *) |
Sends a response through the transport.
| 1 | Reference to this transport itself. |
| 2 | The response to send. |
| char *(* sprkl_transport::strerror) (struct sprkl_transport *, int) |
Converts an error number to a string representation.
| 1 | Reference to this transport itself. |
| 2 | The error number as returned by one of the other virtual functions. |