1
138075
Unregistered / Unconfirmed
GUEST, unregistred user!
type TUser = record
Name: string[16];
NickName: string[16]
Money: currency;
end;
type TApp = record
Name: string[16];
Version: string[16];
end;
ServerSocket 分别向 ClientSocket 发送这2个记录型的数据,
ver
User: TUser;
app: TApp;
begin
user.name := 'asd';
user.nickname := 'ddd';
user.money := 3000;
SvrSocket.Socket.sendbuf(User,SizeOf(TUser));
sleep(0);
App.name:= 'asdfafafadf';
App.version := '1.0';
SvrSocket.Socket.sendbuf(App,SizeOf(TApp));
end;
客户端自然的也定义了1个TUser 和 1个TAPP;
但是,客户端的 ClientSocket 怎么接收?
我怎么知道服务器发来的是哪个record ?
Name: string[16];
NickName: string[16]
Money: currency;
end;
type TApp = record
Name: string[16];
Version: string[16];
end;
ServerSocket 分别向 ClientSocket 发送这2个记录型的数据,
ver
User: TUser;
app: TApp;
begin
user.name := 'asd';
user.nickname := 'ddd';
user.money := 3000;
SvrSocket.Socket.sendbuf(User,SizeOf(TUser));
sleep(0);
App.name:= 'asdfafafadf';
App.version := '1.0';
SvrSocket.Socket.sendbuf(App,SizeOf(TApp));
end;
客户端自然的也定义了1个TUser 和 1个TAPP;
但是,客户端的 ClientSocket 怎么接收?
我怎么知道服务器发来的是哪个record ?