mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
fa9393f7c4
Add debug command on wifi shield to enable debug msgs. Solved issue on repeat quick refresh or stop and go web server
35 lines
890 B
C++
35 lines
890 B
C++
#ifndef Server_Drv_h
|
|
#define Server_Drv_h
|
|
|
|
#include <inttypes.h>
|
|
#include "wifi_spi.h"
|
|
|
|
class ServerDrv
|
|
{
|
|
public:
|
|
// Start server TCP on port specified
|
|
static void startServer(uint16_t port, uint8_t sock);
|
|
|
|
static void startClient(uint32_t ipAddress, uint16_t port, uint8_t sock);
|
|
|
|
static void stopClient(uint8_t sock);
|
|
|
|
static uint8_t getServerState(uint8_t sock);
|
|
|
|
static uint8_t getClientState(uint8_t sock);
|
|
|
|
static bool getData(uint8_t sock, uint8_t *data);
|
|
|
|
static bool getDataBuf(uint8_t sock, uint8_t *data, uint16_t *len);
|
|
|
|
static bool sendData(uint8_t sock, const uint8_t *data, uint16_t len);
|
|
|
|
static uint8_t availData(uint8_t sock);
|
|
|
|
static uint8_t checkDataSent(uint8_t sock);
|
|
};
|
|
|
|
extern ServerDrv serverDrv;
|
|
|
|
#endif
|