Macros | |
#define | BUF_FOUND 2 |
#define | BUF_FULL 1 |
#define | BUF_NOT_FOUND 0 |
#define | BUF_NOT_FULL 0 |
#define | STATE_ACKED 1 |
#define | STATE_BLOCKED_CLOSE 4 |
#define | STATE_BLOCKED_NEWDATA 3 |
#define | STATE_BLOCKED_SEND 5 |
#define | STATE_DATA_SENT 6 |
#define | STATE_NONE 0 |
#define | STATE_READ 2 |
Functions | |
static uint8_t | buf_bufdata (struct psock_buf *buf, uint16_t len, uint8_t **dataptr, uint16_t *datalen) |
static uint8_t | buf_bufto (CC_REGISTER_ARG struct psock_buf *buf, uint8_t endmarker, CC_REGISTER_ARG uint8_t **dataptr, CC_REGISTER_ARG uint16_t *datalen) |
static void | buf_setup (struct psock_buf *buf, uint8_t *bufptr, uint16_t bufsize) |
static char | data_is_sent_and_acked (CC_REGISTER_ARG struct psock *s) |
if (psock_datalen(psock)==0) | |
uint16_t | psock_datalen (struct psock *psock) |
void | psock_init (CC_REGISTER_ARG struct psock *psock, uint8_t *buffer, unsigned int buffersize) |
char | psock_newdata (struct psock *s) |
PT_THREAD (psock_send(CC_REGISTER_ARG struct psock *s, const uint8_t *buf, unsigned int len)) | |
PT_THREAD (psock_generator_send(CC_REGISTER_ARG struct psock *s, unsigned short(*generate)(void *), void *arg)) | |
Variables | |
do | |
buf_setup & | psock |
#define BUF_FOUND 2 |
Referenced by buf_bufto().
#define BUF_FULL 1 |
Referenced by buf_bufdata(), and buf_bufto().
#define BUF_NOT_FOUND 0 |
Referenced by buf_bufto().
#define BUF_NOT_FULL 0 |
Referenced by buf_bufdata().
#define STATE_ACKED 1 |
Referenced by data_is_sent_and_acked().
#define STATE_BLOCKED_CLOSE 4 |
#define STATE_BLOCKED_NEWDATA 3 |
Referenced by psock_newdata().
#define STATE_BLOCKED_SEND 5 |
#define STATE_DATA_SENT 6 |
Referenced by data_is_sent_and_acked(), and PT_THREAD().
#define STATE_NONE 0 |
Referenced by if(), psock_init(), and PT_THREAD().
#define STATE_READ 2 |
Referenced by psock_newdata().
|
static |
References BUF_FULL, BUF_NOT_FULL, psock_buf::left, and psock_buf::ptr.
|
static |
References BUF_FOUND, BUF_FULL, BUF_NOT_FOUND, and c.
|
static |
References bufptr, psock_buf::left, and psock_buf::ptr.
Referenced by psock_init().
|
static |
References STATE_ACKED, STATE_DATA_SENT, uip_acked, uip_mss, uip_rexmit, and uip_send().
Referenced by PT_THREAD().
if | ( | psock_datalen(psock) | = = 0 | ) |
References PT_RESTART, and STATE_NONE.
void psock_init | ( | CC_REGISTER_ARG struct psock * | psock, |
uint8_t * | buffer, | ||
unsigned int | buffersize | ||
) |
References buf_setup(), buffer, PT_INIT, and STATE_NONE.
PT_THREAD | ( | psock_send(CC_REGISTER_ARG struct psock *s, const uint8_t *buf,unsigned int len) | ) |
References buf, data_is_sent_and_acked(), len, PT_BEGIN, PT_END, PT_EXIT, PT_WAIT_UNTIL, and STATE_NONE.
PT_THREAD | ( | psock_generator_send(CC_REGISTER_ARG struct psock *s,unsigned short(*generate)(void *), void *arg) | ) |
References generate(), NULL, PT_BEGIN, PT_END, PT_EXIT, PT_YIELD_UNTIL, STATE_DATA_SENT, STATE_NONE, uip_acked, uip_appdata, uip_mss, uip_rexmit, and uip_send().
do |