Results 1 to 3 of 3

Thread: Socket Error

  1. #1
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default Socket Error

    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 :\

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Are you using Lazarus?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    I used Delphi 7 for this one.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •