Public Attributes | |
char | ip [16] |
IP address. | |
unsigned short | port_nr |
port number to use | |
L4_CV void(* | recv_callback )(const void *buf, const unsigned size, unsigned port) |
Received a packet. | |
L4_CV void(* | ack_callback )(void *addr, unsigned port) |
Send acknowledgement received. | |
L4_CV void(* | rexmit_callback )(void *addr, unsigned size, unsigned port) |
Retransmit of message necessary. | |
L4_CV void(* | connect_callback )(const struct in_addr ip, unsigned port) |
Connection established. | |
L4_CV void(* | abort_callback )(unsigned port) |
Connection has been aborted. | |
L4_CV void(* | timeout_callback )(unsigned port) |
Connection timed out. | |
L4_CV void(* | close_callback )(unsigned port) |
Connection closed. | |
L4_CV void(* | poll_callback )(void) |
Periodic poll callback. |
Definition at line 21 of file uip-ore.h.
L4_CV void(* uip_ore_config::recv_callback)(const void *buf, const unsigned size, unsigned port) |
Received a packet.
buf | the packet data | |
size | data size in bytes | |
port | port the data was received through |
L4_CV void(* uip_ore_config::ack_callback)(void *addr, unsigned port) |
Send acknowledgement received.
This is called so that the user is able to free dynamically allocated buffers after they have been successfully sent.
NOTE: When closing the connection, all pending data is dropped. For each dropped packet the ack_callback() is also called, because also these packets might be needed to be freed.
addr | address of the buffer that has been acknowledged/dropped. | |
port | port this packet was sent through |
L4_CV void(* uip_ore_config::rexmit_callback)(void *addr, unsigned size, unsigned port) |
Retransmit of message necessary.
This could also be done by the library, but the callback shall give you the opportunity to react upon such situations.
addr | packet needing to be retransmitted. Just call uip_ore_send() again. | |
size | size of packet | |
port | port to resend to |
L4_CV void(* uip_ore_config::connect_callback)(const struct in_addr ip, unsigned port) |
Connection established.
ip | IP address remote host | |
port | remote port |
L4_CV void(* uip_ore_config::abort_callback)(unsigned port) |
Connection has been aborted.
port | remote port |
L4_CV void(* uip_ore_config::timeout_callback)(unsigned port) |
Connection timed out.
port | remote port |
L4_CV void(* uip_ore_config::close_callback)(unsigned port) |
Connection closed.
port | remote port |
L4_CV void(* uip_ore_config::poll_callback)(void) |
Periodic poll callback.
uIP periodically polls the server callback function every 500 ms. If you want to do something upon this period, this is the callback to do so.