Skip to content

WiFiStream

詳細情報

メンバー

WiFiStream()

constructor for TCP server

WiFiStream::WiFiStream(uint16_t server_port)

引数

  • uint16_t server_port

WiFiStream()

constructor for TCP client

WiFiStream::WiFiStream(IPAddress server_ip, uint16_t server_port)

引数

  • IPAddress server_ip
  • uint16_t server_port

attach()

void WiFiStream::attach(hostConnectionCallbackFunction newFunction)

引数

  • hostConnectionCallbackFunction newFunction

config()

configure a static local IP address without defining the local network DHCP will be used as long as local IP address is not defined

void WiFiStream::config(IPAddress local_ip)

引数

  • IPAddress local_ip

config()

configure a static local IP address DHCP will be used as long as local IP address is not defined

void WiFiStream::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet)

引数

  • IPAddress local_ip
  • IPAddress gateway
  • IPAddress subnet

getLocalIP()

IPAddress WiFiStream::getLocalIP()

戻り値

IPAddress local IP address

maintain()

maintain WiFi and TCP connection

virtual bool WiFiStream::maintain()=0

戻り値

bool true if WiFi and TCP connection are established

stop()

close TCP client connection

virtual void WiFiStream::stop()=0

begin()

initialize WiFi without security (open) and initiate client connection if WiFi connection is already established

int WiFiStream::begin(char *ssid)

引数

  • char * ssid

戻り値

int WL_CONNECTED if WiFi connection is established

begin()

initialize WiFi with WEP security and initiate client connection if WiFi connection is already established

int WiFiStream::begin(char *ssid, uint8_t key_idx, const char *key)

引数

  • char * ssid
  • uint8_t key_idx
  • constchar * key

戻り値

int WL_CONNECTED if WiFi connection is established

begin()

initialize WiFi with WPA-PSK security and initiate client connection if WiFi connection is already established

int WiFiStream::begin(char *ssid, const char *passphrase)

引数

  • char * ssid
  • constchar * passphrase

戻り値

int WL_CONNECTED if WiFi connection is established

available()

int WiFiStream::available()

戻り値

int

flush()

void WiFiStream::flush()

peek()

int WiFiStream::peek()

戻り値

int

read()

int WiFiStream::read()

戻り値

int

write()

size_t WiFiStream::write(uint8_t byte)

引数

  • uint8_t byte

戻り値

size_t