1 /* 2 WiFiServer.h - Library for Arduino Wifi shield. 3 Copyright (c) 2011-2014 Arduino LLC. All right reserved. 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef wifiserver_h 21 #define wifiserver_h 22 23 extern "C" { 24 #include "utility/wl_definitions.h" 25 } 26 27 #include "Server.h" 28 29 class WiFiClient; 30 31 class WiFiServer : public Server { 32 private: 33 uint16_t _port; 34 void* pcb; 35 public: 36 WiFiServer(uint16_t); 37 WiFiClient available(uint8_t* status = NULL); 38 void begin(); 39 virtual size_t write(uint8_t); 40 virtual size_t write(const uint8_t *buf, size_t size); 41 uint8_t status(); 42 43 using Print::write; 44 }; 45 46 #endif 47