Z
zhuchengchuan
Unregistered / Unconfirmed
GUEST, unregistred user!
: 开发工具elphi7,组件TcpClient1的BlockMode为bmBlocking,TcpServer1的BlockMode为bmThreadBlocking;
发送数据事件:
var
I,J: Integer;
vSendMess: array of Byte;
k: Integer;
begin
k := 4;
SetLength(vSendMess,k);
for i := 0 to k - 1 do
vSendMess := (i + 64);
TcpClient1.SendBuf(vSendMess,SizeOf(vSendMess));
......
接收事件:
var
vReceMess: array of PChar;
k: Integer;
vReceStr: string;
begin
k := 4;
SetLength(vReceMess,k);
ClientSocket.ReceiveBuf(vReceMess,SizeOf(vReceMess));
........
vReceMess中没有数据;
发送数据事件:
var
I,J: Integer;
vSendMess: array of Byte;
k: Integer;
begin
k := 4;
SetLength(vSendMess,k);
for i := 0 to k - 1 do
vSendMess := (i + 64);
TcpClient1.SendBuf(vSendMess,SizeOf(vSendMess));
......
接收事件:
var
vReceMess: array of PChar;
k: Integer;
vReceStr: string;
begin
k := 4;
SetLength(vReceMess,k);
ClientSocket.ReceiveBuf(vReceMess,SizeOf(vReceMess));
........
vReceMess中没有数据;