using of lNet lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- skaner1900 · 2011-04-03 18:35 Hi. Examples for lNet are very poor, so maybe somebody know how (TCP/IP): 1. Accept or reject connection (server) 2. Send message to only one user (server and client) 3. Check, who sent message which we are receiving (server and client) 4. Secure application by intercept messages by unauthorized person Thanks ---------------------------------------------------------------------- Dibo · 2011-04-03 18:45 I am using lHTTP component only but sender is in aSocket param: 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 procedure TFormMain.LTCPComponentReceive(aSocket: TLSocket);begin  aSocket.SendMessage('Reply to sender');end; ---------------------------------------------------------------------- Leledumbo · 2011-04-03 18:59 QuoteExamples for lNet are very poorReally? They're very good to me. What makes you think so? For questions below, drop TLTCPComponent to your form first. Quote1. Accept or reject connection (server)Call Listen method to host an address, then handle OnAccept. You can check PeerAddress/PeerPort to determine whether to accept or reject, if you do nothing it will default to Accept() (because it's already accepted). Use Disconnect() to reject. Quote2. Send message to only one user (server and client)TLTCPComponent can act as both server and client. First Connect() to target (in this case, we don't care whether it's client or server), then use Send() or SendMessage() to send the message. Quote3. Check, who sent message which we are receiving (server and client)See answer for question no. 1 Quote4. Secure application by intercept messages by unauthorized personSame as above. ---------------------------------------------------------------------- Almindor · 2011-04-03 21:38 Quote from: skaner1900 on April 03, 2011, 08:35:56 pmHi. Examples for lNet are very poor, so maybe somebody know how (TCP/IP): 1. Accept or reject connection (server) 2. Send message to only one user (server and client) 3. Check, who sent message which we are receiving (server and client) 4. Secure application by intercept messages by unauthorized person Thanks You're always welcome to submit patches or new example demoes to lNet. It's true that none of your questions are directly answered by an example, but I think the demoes in combination with the documentation should suffice to explain what needs to be done. Also, your "authentication" (point 4) use case is specific and needs to be handled by the user/application, not lNet. Leledumbo answered all the questions nicely, so I won't repeat it.