描述 用来判断某个 Client 物件是否已准备好。 语法 if (client) 参数 无参数 回传 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.
描述 创建一个用户端,用来与指定的 IP 位址与埠编号连线。(使用 client.connect() 指定伺服端的 IP 位址与埠编号) 语法 EthernetClient() 参数 无参数 范例 函式库参考主页 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.
对不起,此内容只适用于English。
描述 在欲传送的资料最后加上换行字元(\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 […]
描述 传送资料到目前与伺服端连线的所有用户端。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 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 […]
描述 传送资料到目前与伺服端连线的所有用户端。 语法 server.write(val) server.write(buf, len) 参数 val:要传送到用户端的资料,大小为一个位元组,型态可以为 byte 或 char buf:一个含有要传送给用户端的资料的阵列,型态可以为 byte 或 char len:要传送的资料阵列的大小 回传 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 […]
描述 取得一个与伺服端连线并且有资料要传送给伺服端的用户端。这个用户端的连线并不会因为 Client 物件解构而中断,如果要中断连线可以呼叫 client.stop()。 available() 是从 Stream 继承而来。 语法 server.available() 参数 无参数 回传 Client 物件:如果没有连线中的用户端或是连线中的用户端都没有资料可以读取,这个回传的 Client 物件等同于 false(参考以下范例) 范例 See Also - Stream.available() 函式库参考主页面 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 […]
描述 启动伺服端,让伺服端开始监听连线请求。 语法 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.
描述 创建一个伺服端,这个伺服端会监听指定的埠是否有连线的请求。 语法 EthernetServer(port); 参数 port: 要监听的埠编号 回传 无回传值 范例 函式库参考主页面 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.
对不起,此内容只适用于English。