Description Read a byte from the file without advancing to the next one. That is, successive calls to peek() will return the same value, as will the next call to read(). This function inherited from the Stream class. See the Stream class main page for more information. Syntax WiFiUDP.peek() Parameters none Returns -b: the next […]
Description It starts processing the next available incoming packet, checks for the presence of a UDP packet, and reports the size. parsePacket() must be called before reading the buffer with UDP.read(). Syntax UDP.parsePacket(); Parameters None Returns -the size of the packet in bytes -0: if no packets are available See also - read() Libraries Reference […]
Description Writes UDP data to the remote connection. Must be wrapped between beginPacket() and endPacket(). beginPacket() initializes the packet of data, it is not sent until endPacket() is called. Syntax WiFiUDP.write(byte); WiFiUDP.write(buffer, size); Parameters byte: the outgoing byte buffer: the outgoing message size: the size of the buffer Returns -single byte into the packet -bytes […]
Description Called after writing UDP data to the remote connection. It finishes off the packet and send it. Syntax WiFiUDP.endPacket(); Parameters None Returns -1: if the packet was sent successfully -0: if there was an error Libraries Reference Home The text of the 86Duino reference is a modification of the 86Duino reference, and is licensed […]
Description Starts a connection to write UDP data to the remote connection Syntax WiFiUDP.beginPacket(hostName, port); WiFiUDP.beginPacket(hostIp, port); Parameters hostName: the address of the remote host. It accepts a character string or an IPAddress hostIp: the IP address of the remote connection (4 bytes) port: the port of the remote connection (int) Returns -1: if successful […]
Description Get the number of bytes (characters) available for reading from the buffer. This is data that’s already arrived. This function can only be successfully called after WiFiUDP.parsePacket(). available() inherits from the Stream utility class. Syntax WiFiUDP.available() Parameters None Returns - the number of bytes available in the current packet - 0: if parsePacket hasn’t […]
Description Initializes the WiFi UDP library and network settings. Starts WiFiUDP socket, listening at local port Syntax WiFiUDP.begin(port); Parameters port: the local port to listen on (int) Returns - 1: if successful - 0: if there are no sockets available to use Libraries Reference Home The text of the 86Duino reference is a modification of […]
Description Creates a named instance of the WiFi UDP class that can send and receive UDP messages Syntax WiFiUDP Parameters none Libraries Reference Home The text of the 86Duino reference is a modification of the 86Duino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into […]
Description Disconnect from the server. Syntax client.stop() Parameters none Returns none Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
Description Discard any bytes that have been written to the client but not yet read. flush() inherits from the Stream utility class. Syntax client.flush() Parameters none Returns none Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code […]