Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Hi guys I'm just wondering what the best way would be to send an image through sockets?
My server is in Node.JS and my client is in C.
Thanks for letting me know :X
通常这些事情是通过发送内容的长度和图像的二进制内容来完成的。鉴于您正在使用 JS,您可能必须在发送之前对字符串进行 BASE64 编码,并在接收之后进行解码。