# modules/uip/uip/psock.c File Reference

`#include <stdio.h>`
`#include <string.h>`
`#include "uipopt.h"`
`#include "psock.h"`
`#include "uip.h"`

## Defines
#define | STATE_NONE 0
#define | STATE_ACKED 1
#define | STATE_READ 2
#define | STATE_BLOCKED_NEWDATA 3
#define | STATE_BLOCKED_CLOSE 4
#define | STATE_BLOCKED_SEND 5
#define | STATE_DATA_SENT 6
#define | BUF_NOT_FULL 0
#define | BUF_NOT_FOUND 0
#define | BUF_FULL 1
#define | BUF_FOUND 2
## Functions
| PT_THREAD (psock_send(register struct psock *s, const char *buf, unsigned int len))
| PT_THREAD (psock_generator_send(register struct psock *s, unsigned short(*generate)(void *), void *arg))
u16_t | psock_datalen (struct psock *psock)
char | psock_newdata (struct psock *s)
| PT_THREAD (psock_readto(register struct psock *psock, unsigned char c))
| PT_THREAD (psock_readbuf(register struct psock *psock))
void | psock_init (register struct psock *psock, char *buffer, unsigned int buffersize)

## Define Documentation

#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

## Function Documentation

void psock_init | ( | register struct psock * | psock,
|  | char * | buffer,
|  | unsigned int | buffersize |
| ) |  |  |

PT_THREAD | ( | psock_readbuf(register struct psock *psock) |  | ) |

Here is the call graph for this function:

PT_THREAD | ( | psock_readto(register struct psock *psock, unsigned char c) |  | ) |

Here is the call graph for this function:

PT_THREAD | ( | psock_generator_send(register struct psock *s,unsigned short(*generate)(void *), void *arg) |  | ) |

PT_THREAD | ( | psock_send(register struct psock *s, const char *buf,unsigned int len) |  | ) |