From db605dd18b11ecfb5cd9f92c721c52cb70543384 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Mon, 1 Jun 2009 08:32:11 +0000 Subject: First integration of the Arduino code in Processing 5503: PreProcessor and Compiler have been integrated with changes to the Sketch. Compilation still has problems (Thread error on success, and can't handle non-pde files in a sketch). Modified the Mac OS X make.sh to copy the hardware, avr tools, and example over. Removing some of the antlr stuff. Disabling the Commander (command-line execution) for now. Added Library, LibraryManager, and Target. Added support for prefixed preferences (e.g. for boards and programmers). --- libraries/Ethernet/utility/socket.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 libraries/Ethernet/utility/socket.h (limited to 'libraries/Ethernet/utility/socket.h') diff --git a/libraries/Ethernet/utility/socket.h b/libraries/Ethernet/utility/socket.h new file mode 100755 index 0000000..a5cce42 --- /dev/null +++ b/libraries/Ethernet/utility/socket.h @@ -0,0 +1,23 @@ +/* +* +@file socket.h +@brief define function of socket API +* +*/ + +#ifndef _SOCKET_H_ +#define _SOCKET_H_ + +extern uint8 socket(SOCKET s, uint8 protocol, uint16 port, uint8 flag); // Opens a socket(TCP or UDP or IP_RAW mode) +extern void close(SOCKET s); // Close socket +extern uint8 connect(SOCKET s, uint8 * addr, uint16 port); // Establish TCP connection (Active connection) +extern void disconnect(SOCKET s); // disconnect the connection +extern uint8 listen(SOCKET s); // Establish TCP connection (Passive connection) +extern uint16 send(SOCKET s, const uint8 * buf, uint16 len); // Send data (TCP) +extern uint16 recv(SOCKET s, uint8 * buf, uint16 len); // Receive data (TCP) +extern uint16 sendto(SOCKET s, const uint8 * buf, uint16 len, uint8 * addr, uint16 port); // Send data (UDP/IP RAW) +extern uint16 recvfrom(SOCKET s, uint8 * buf, uint16 len, uint8 * addr, uint16 *port); // Receive data (UDP/IP RAW) + +extern uint16 igmpsend(SOCKET s, const uint8 * buf, uint16 len); +#endif +/* _SOCKET_H_ */ -- cgit v1.2.3-18-g5258