Articles Posted by the Author:

  • read()

    read()

    描述 读取从伺服端传送至 Client 的资料。 read() 是从 Stream 继承而来。 语法 client.read() 参数 无参数 回传 byte:从伺服器传送来的资料,如果没有资料可以读取,会回传 -1 See also - Stream.read() 函式库参考主页面 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.


  • available()

    available()

    描述 回传目前与 Client 连线的伺服端传送过来的资料量,这些资料都是目前可以读取的。 available() 是从 Stream 继承而来。 语法 client.available() 参数 无参数 回传 int:目前可以读取的资料量,以位元组为单位 范例 函式库参考主页面 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.


  • println()

    println()

    描述 在欲传送的资料最后加上换行字元(’\n’)并且传送到目前与 Client 连线的伺服端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 client.println() client.println(data) client.println(data, BASE) 参数 data (非必要):要传送的资料,型态可以为 char, byte, int, long 或 string BASE (非必要):BASE 用来指定资料的格式;可用的格式有:BIN (二进位格式)、OCT (八进位格式)、DEC (十进位格式)、HEX (十六进位格式) 回传 byte:回传 println() 传送至伺服端的位元组数量 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed […]


  • print()

    print()

    描述 传送资料到 Client 目前连线的伺服端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 client.print(data) client.print(data, BASE) 参数 data:要传送的资料,型态可以为 char, byte, int, long 或 string BASE (非必要):BASE 用来指定资料的格式;可用的格式有:BIN (二进位格式)、OCT (八进位格式)、DEC (十进位格式)、HEX (十六进位格式) 回传 byte:回传 print() 传送至伺服端的位元组数量 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a […]


  • write()

    write()

    描述 传送资料到 Client 目前连线的伺服端。 语法 client.write(data) 参数 data:要传送到伺服端的资料,型态可以为 byte 或 char 回传 byte:回传 write() 传送至伺服端的位元组数量 函式库参考主页面 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.


  • connect()

    connect()

    描述 连线到指定的 IP 位址与埠编号。除了使用 IP 位址与埠编号作为指定伺服器的方法,还可以使用网域名称(Domain Name)。 语法 client.connect(ip, port) client.connect(URL, port) 参数 ip:要连线的伺服器的 IP 位址(大小为 4 位元组的阵列) URL:要连线的伺服器的网域名称,型态为 string (例:”www.86duino.com”) port:要连线的伺服器的埠编号,型态为 int 回传 boolean:如果连线成功回传 true,反之回传 false 范例 函式库参考主页面 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 […]


  • connected()

    connected()

    描述 判断 Client 物件是否连线中。如果用户端与伺服端的连线已经中断了,但是 Client 物件中仍然有从伺服端传送的资料而未被读取的话,该 Client 物件仍被视为连线中。 语法 client.connected() 参数 无参数 回传 boolean:如果该 Client 物件连线中则回传 true,反之回传 false 范例 函式库参考主页面 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.


  • WiFiClient()

    WiFiClient()

    描述 创建一个用户端,用来与指定的 IP 位址与埠编号连线。(使用 client.connect() 指定伺服端的 IP 位址与埠编号) 语法 WiFiClient client; 参数 无参数 范例 函式库参考主页面 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.


  • Client

    Client

    描述 Client 类别实作客户端的功能,让 86Duino 可以成为客户端。 函式库参考主页面 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.


  • println()

    println()

    描述 在欲传送的资料最后加上换行字元(’\n’)并且传送到目前与伺服端连线的所有用户端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 server.println() server.println(data) server.println(data, BASE) 参数 data(非必要):要传送的资料,型态可以为 char, byte, int, long 或 string BASE (非必要):BASE 用来指定资料的格式;可用的格式有:BIN (二进位格式)、OCT (八进位格式)、DEC (十进位格式)、HEX (十六进位格式) 回传 byte:回传 println() 传送至用户端的位元组数量 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative […]