PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/libraries/WiFi/utility/socket.c

https://github.com/gusvielite/Arduino
C | 39 lines | 12 code | 3 blank | 24 comment | 0 complexity | de3f9ffa3e5b35b2a0b76f6ca99d9c33 MD5 | raw file
Possible License(s): LGPL-2.1, AGPL-1.0, LGPL-3.0, BSD-3-Clause
  1. /*
  2. socket.c - Library for Arduino Wifi shield.
  3. Copyright (c) 2011-2014 Arduino. All right reserved.
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. */
  16. /*
  17. *
  18. @file socket.c
  19. @brief define function of socket API
  20. *
  21. */
  22. #include <inttypes.h>
  23. #include "socket.h"
  24. SOCKET socket(uint8 protocol) {return 0;} // Opens a socket(TCP or UDP or IP_RAW mode)
  25. void close(SOCKET s) {} // Close socket
  26. uint8 connect(SOCKET s, uint8 * addr, uint16 port) {return 0;} // Establish TCP connection (Active connection)
  27. void disconnect(SOCKET s) {} // disconnect the connection
  28. uint8 listen(SOCKET s) { return 0;} // Establish TCP connection (Passive connection)
  29. uint16 send(SOCKET s, const uint8 * buf, uint16 len) { return 0;} // Send data (TCP)
  30. uint16 recv(SOCKET s, uint8 * buf, uint16 len) {return 0;} // Receive data (TCP)
  31. uint16 sendto(SOCKET s, const uint8 * buf, uint16 len, uint8 * addr, uint16 port) {return 0;} // Send data (UDP/IP RAW)
  32. uint16 recvfrom(SOCKET s, uint8 * buf, uint16 len, uint8 * addr, uint16 *port) {return 0;} // Receive data (UDP/IP RAW)
  33. uint16 igmpsend(SOCKET s, const uint8 * buf, uint16 len) {return 0;}