how to limit the lnet console ltcp lclient/lserver example to one connection lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- RickD · 2016-12-18 19:00 Hello all, I'm trying to limit the connections of the lnet ltcp console client/server example to just one connection. Also i'd like to send the server reply directly to the 1 client without iterating, unlike like below. -- snippet lserver.pp     FCon.IterReset; // now it points to server socket     while FCon.IterNext do begin // while we have clients to echo to       n := FCon.SendMessage(s, FCon.Iterator);       if n < Length(s) then // try to send to each of them         Writeln('Unsuccessful send, wanted: ', Length(s), ' got: ', n); // if send fails write error     end; -- It's probably not to complicated (i imagine there is some property for this). But so far i can't find much reference documentation other than the xml file in the package (which i have no idea how to view properly yet), and the object definitions in the lnet.pp file. Note that i use a command line fpc and haven't been able to import the package in my lazarus win64 (v1.2.6). So maybe when imported correctly reference xml data is available. Not really sure on this. Any help with this is much appreciated! Regards, Rick ---------------------------------------------------------------------- bytebites · 2016-12-18 19:31 Perhaps FCon.SendMessage(s, aSocket);? ---------------------------------------------------------------------- RickD · 2016-12-19 09:26 Quote from: bytebites on December 18, 2016, 08:31:38 pmPerhaps FCon.SendMessage(s, aSocket);? I guess this could work if one global stores the asocket at .onAC and re uses it at .onRe. But the basic thing i'm looking for is something like "FCon.MaxConnections:=1;" (in .create), so there will be just one connection .. (btw: this is just an example, i know it does not exist)