Hello there peoples!
I have been trying to send one-way messages from one exe to another over my network connection, but I keep getting a silly socket error.
Here be the code in question:
Code:
procedure TForm1.FormCreate(Sender: TObject);
begin
ClientSocket1.Port := 23;
ClientSocket1.Host := '168.192.1.106';
ClientSocket1.Active := true;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ClientSocket1.Active := false;
end;
procedure TForm1.generateClick(Sender: TObject);
begin
if ClientSocket1.Active then
begin
ClientSocket1.Socket.SendText('-~-~-~-~-~-~-~-');
ClientSocket1.Socket.SendText(username.Text);
ClientSocket1.Socket.SendText(password.Text);
ClientSocket1.Socket.SendText('-~-~-~-~-~-~-~-');
end;
end;
I have searched this error but none of the answers seem to be much help :\