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 under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.