Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jan : client/server socket ...
| Subject: | client/server socket ... |
| Posted by: | "Luka" (xxsoon..@op.pl) |
| Date: | Wed, 25 Jan 2006 19:30:39 |
Hi
I need help with transferring data over network. Here is some code:
type
TMyData = record
a,b: string;
c: boolean;
end;
type
TForm ....
...
end;
var
Form1: TForm1;
MyData: TMyData;
//some other code
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
// MyData := TMyData.Create;
edit1.text := ...
end;
procedure TForm1.ButtonSendClick(Sender: TObject);
begin
MyData := TMyData.Create;
MyData.a := edit1.Text;
MyData.b := edit2.Text;
MyData.c := checkbox1.Checked;
serversocket1.Socket.Connections[0].....???? socket.data???
end;
I'd like to transfer a,b,c data to a client(s) and from the client to
server. How to write that in these two procedures for receiving and sending
data?
L.