使用winsock发送/接收记录的字段 [英] Send/receive fields of a record with winsock

查看:78
本文介绍了使用winsock发送/接收记录的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C ++ winsock在服务器和客户端应用程序中发送和接收记录的多个字段。

How do i send and receive multiple fields of a record in server and client application with C++ winsock.

推荐答案

与发送和接收任何内容的方式相同。您只需要您的客户端和服务器了解要传输的数据的格式。如果它是固定长度记录比那容易。如果它是可变长度,那么你只需要包含额外的信息来显示数据的长度。
The same way you send and receive anything. You just need your client and server to understand the format of the data that you are transferring. If it is fixed length records than that is easy. If it is variable length then you just need to include extra information to show the length of the data.


这篇关于使用winsock发送/接收记录的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆