Need to read a simple string stream from an IP address lazarus / 66-Unix ---------------------------------------------------------------------- AlanTheBeast · 2016-09-25 17:47 Hi, I don't use Lazarus, just FPC command line (via Lightweight). I have a nifty app on my iPhone called SensorLog and it will output whatever sensor data from the phone one sets up to an IP address and a set port.  I can telnet that to the terminal such as $ telnet 192.168.1.22 60444 or $ telnet 192.168.1.22 60444 > a_file.csv but I can't get a named pipe or directed pipe to read in the stream. Is there some "light" unit that will allow me to read the stream? Something like      - set an IP address and port as a textfile or a stream      - read from it until dizzy      - close when done Thanks ---------------------------------------------------------------------- Phil · 2016-09-25 17:51 Not sure if I follow. Does an HTTP request using FPC's TFPHTTPClient class work? (fphttpclient unit) ---------------------------------------------------------------------- AlanTheBeast · 2016-09-25 22:51 I don't know Phil - but now that you've pointed me at that unit I'll see what I see! ---------------------------------------------------------------------- Phil · 2016-09-25 23:00 I might have misunderstood what you're doing. Are you using telnet on a computer as a way to read from the iOS app sends? I think that for an HTTP request to work, the iOS app would need to act like a Web app running under a Web server. That is, when it receives a request for data, it returns it in a response. From the description on the app store, it appears as though it SensorLog can do that: https://itunes.apple.com/us/app/sensorlog/id388014573?mt=8 I believe iOS includes a Web server (Apache) because I've seen an iOS app that works like a Web app. Perhaps SensorLog is using the server to service the HTTP requests. ---------------------------------------------------------------------- Thaddy · 2016-09-26 04:30 Http should work since it is explicitly supported by SensorLog. see docs in appstore that reads: per HTTP GET/POST. In that case it should be very easy with TFPHttp and trivial with synapse. [edit] The httpget example in /packages/fcl-web/examples/httpclient/ works straight out of the box, tested against an apache server. usage: httpget With synapse use: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function HttpGetText(const URL: string; const Response: TStrings): Boolean;// in httpsend.pas There's TCP/IP only streaming client example in this blogpost by forum member leledumbo: http://pascalgeek.blogspot.nl/2012/06/encryption-decryption-and- asynchronous.html Scroll-down a bit.