Contiki-NG
Data Structures | Macros

Protosocket library header file. More...

#include "contiki.h"
#include "contiki-lib.h"
#include "contiki-net.h"

Go to the source code of this file.

Data Structures

struct  psock
 The representation of a protosocket. More...
 

Macros

#define PSOCK_INIT(psock, buffer, buffersize)
 Initialize a protosocket. More...
 
#define PSOCK_BEGIN(psock)
 Start the protosocket protothread in a function. More...
 
#define PSOCK_SEND(psock, data, datalen)
 Send data. More...
 
#define PSOCK_SEND_STR(psock, str)
 Send a null-terminated string. More...
 
#define PSOCK_GENERATOR_SEND(psock, generator, arg)
 Generate data with a function and send it. More...
 
#define PSOCK_CLOSE(psock)
 Close a protosocket. More...
 
#define PSOCK_READBUF(psock)
 Read data until the buffer is full. More...
 
#define PSOCK_READBUF_LEN(psock, len)
 Read data until at least len bytes have been read. More...
 
#define PSOCK_READTO(psock, c)
 Read data up to a specified character. More...
 
#define PSOCK_DATALEN(psock)
 The length of the data that was previously read. More...
 
#define PSOCK_EXIT(psock)
 Exit the protosocket's protothread. More...
 
#define PSOCK_CLOSE_EXIT(psock)
 Close a protosocket and exit the protosocket's protothread. More...
 
#define PSOCK_END(psock)
 Declare the end of a protosocket's protothread. More...
 
#define PSOCK_NEWDATA(psock)
 Check if new data has arrived on a protosocket. More...
 
#define PSOCK_WAIT_UNTIL(psock, condition)
 Wait until a condition is true. More...
 

Detailed Description

Protosocket library header file.

Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se

Definition in file psock.h.