Articles Posted in the " " Category

  • 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 […]


  • print()

    print()

    描述 传送资料到目前与伺服端连线的所有用户端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 server.print(data) server.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 Creative Commons […]


  • write()

    write()

    描述 传送资料到目前与伺服端连线的所有用户端。 语法 server.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.


  • available()

    available()

    描述 取得一个与伺服端连线并且有资料要传送给伺服端的用户端。这个用户端的连线并不会因为 Client 物件解构而中断,如果要中断连线可以呼叫 client.stop()。 available() 是从 Stream 继承而来。 语法 server.available() 参数 无参数 回传 Client:如果没有连线中的用户端或是连线中的用户端都没有资料可以读取,这个回传的 Client 物件等同于 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.


  • begin()

    begin()

    描述 启动伺服端,让伺服端开始监听连线请求。 语法 server.begin() 参数 无参数 回传 无回传值 范例 函式库参考主页面 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.


  • WiFiServer()

    WiFiServer()

    描述 创建一个伺服端,这个伺服端会监听指定的埠是否有连线的请求。 语法 WiFiServer server(port); 参数 port:要监听的埠编号,型态为 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.


  • Server

    Server

    描述 Server 类别实作伺服端的功能,让 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.