📜  将 int 写入套接字 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:08.178000             🧑  作者: Mango

代码示例1
int n = 4;
int tmp = htonl(n);
write(socket, &tmp, sizeof(tmp));