F
fu_xiang_yu
Unregistered / Unconfirmed
GUEST, unregistred user!
目的:客户端按button1时,服务端出现对话框,内容是'hello'
客户端:
在button1click事件:
reqcodestr:='hello';
strpcopy(reqcode,reqcodestr);
clientsocket1.address:='127.0.0.1';
clientsocket1.port:=1111;
clientsocket1.active:=true;
clientsocket1.Socket.SendBuf(reqcode,30);
服务器端:(监听端口1111,本地运行)
在clientread事件中,
serversocket1.Socket.ReceiveBuf(reqcode,30);
reqcodestr:=reqcode;
showmessage(reqcodestr);//但这句根本没有反应,没有对话框出现
后来远程运行了一下也不行,请问是怎么回事?
客户端:
在button1click事件:
reqcodestr:='hello';
strpcopy(reqcode,reqcodestr);
clientsocket1.address:='127.0.0.1';
clientsocket1.port:=1111;
clientsocket1.active:=true;
clientsocket1.Socket.SendBuf(reqcode,30);
服务器端:(监听端口1111,本地运行)
在clientread事件中,
serversocket1.Socket.ReceiveBuf(reqcode,30);
reqcodestr:=reqcode;
showmessage(reqcodestr);//但这句根本没有反应,没有对话框出现
后来远程运行了一下也不行,请问是怎么回事?