Port connection lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- michoux · 2020-08-02 17:41 Hello, I want to connect to another application on particular port. Application is continuously sending data on this port. I use blocksocket var connection:TBlockSocket;   //The class of sockets     connected:boolean;         //For testing the connection     messagein:string;          //For incoming messages I connect to IP which is in edit boxes   connection:=TBlockSocket.Create;   connection.CreateSocket;                        connection.Connect(127.0.0.1,27333);            ***************************** procedure TForm1.Timer1Timer(Sender: TObject);  begin   Application.ProcessMessages;              if connected=true then begin     messagein:=connection.RecvString(1);     if not(messagein='') then begin              Memo1.Append(messagein);                  end;   end;                                                                ***************************** I do not get any data in memo, I tested with telneting to port and I see data is comming also I try with realterm and I can see data. ---------------------------------------------------------------------- michoux · 2020-08-02 18:11 Hi, I try with  messagein:=connection.RecvTerminated(1,'|'); Since pipe is my terminator. Is there option to work without timer? I want to listen if something comes like I usually do with serial port? ---------------------------------------------------------------------- kupferstecher · 2020-08-02 20:38 I don't know your library, but looks like Synapse. What protocol is used for the communication? TCP? In Synapse then you should use TTCPBlockSocket. (Just from memory, I'm not at the computer right now).