- minor fixes and improvements
This commit is contained in:
12
ascon.i
12
ascon.i
@@ -50,12 +50,12 @@ typedef enum {
|
||||
*
|
||||
* custom handlers must have this prototype
|
||||
*/
|
||||
typedef int (* AsconHandler)(AsconPtr connection);
|
||||
typedef int (* AsconHandler)(Ascon *connection);
|
||||
|
||||
/** Ascon struct
|
||||
* all members are public, allowing access by handler wrappers
|
||||
*/
|
||||
typedef struct Ascon {
|
||||
struct Ascon {
|
||||
AsconState state; /**< the current state */
|
||||
int fd; /**< socket */
|
||||
int readState; /**< default implementation: 'was cr' */
|
||||
@@ -70,7 +70,7 @@ typedef struct Ascon {
|
||||
int noResponse; /**< no response expected */
|
||||
int responseValid; /**< a valid response is ready */
|
||||
AsconHandler handler; /**< handler function */
|
||||
} Ascon;
|
||||
};
|
||||
|
||||
#define ASCON_SELECT_ERROR -1
|
||||
#define ASCON_RECV_ERROR -2
|
||||
@@ -83,7 +83,7 @@ typedef struct Ascon {
|
||||
*
|
||||
* In most cases a custom handler may be a wrapper around AsconStdHandler
|
||||
*/
|
||||
int AsconStdHandler(AsconPtr a);
|
||||
int AsconStdHandler(Ascon *a);
|
||||
|
||||
/** \brief initialize a standard connection
|
||||
* \param a the connection
|
||||
@@ -91,7 +91,7 @@ int AsconStdHandler(AsconPtr a);
|
||||
*
|
||||
* In most cases a custom init function may be a wrapper around AsconStdInit
|
||||
*/
|
||||
void AsconStdInit(AsconPtr a, char *hostport);
|
||||
void AsconStdInit(Ascon *a, char *hostport);
|
||||
|
||||
/** The Ascon Protocol
|
||||
*/
|
||||
@@ -111,7 +111,7 @@ void AsconInsertProtocol(AsconProtocol *protocol);
|
||||
* \param a the connection to be closed
|
||||
* remark: the connection struct itself has to be freed manually
|
||||
*/
|
||||
void AsconClose(AsconPtr a);
|
||||
void AsconClose(Ascon *a);
|
||||
|
||||
/** \brief swallow garbage (utility function)
|
||||
* \param fd the socket
|
||||
|
||||
Reference in New Issue
Block a user