天天看點

socket client簡單傳輸資料

資料類型的轉換:

一、整數和二進制資料之間的轉換

(1243).to_bytes(4, byteorder='big')

int.from_bytes((1243).to_bytes(4, byteorder='big'), byteorder='big')

二進制的拼接:

方案二:

多個資料的合并