* * *

Author Topic: Reading and wiriting to socket in SSL mode (lNet)  (Read 898 times)

mlody87

  • New member
  • *
  • Posts: 14
Reading and wiriting to socket in SSL mode (lNet)
« on: February 06, 2017, 10:09:09 pm »
Hi!
I create server for multi clients connections. Without SSL everything is OK. On OnReceive function I receive aSocket:

Code: Pascal  [Select]
  1. procedure TFormMain.LTCPComponentReceive(aSocket: TLSocket);
  2. var
  3.   s: string;
  4. begin
  5.   if aSocket.GetMessage(s) > 0 then begin
  6.     //save socket in some array or map - SomeArray[I]:=aSocket;
  7.  

after this I can identify socket, read and write into socket in some array f.ex

Code: Pascal  [Select]
  1. TLTCPComponent.SendMessage(SomeArray[I], Message);
  2.  

but when I switch on SSL Mode this doesnt work :( Can you tell me how should I create SSL connction, read and write data in SSL connection mode for few clients sockets?
I use lNet.

I look into demos but there is example with sending to all connected clients but I would like to identify clients and read, send data for specify one.

I realy need an example and help :(

thx!
« Last Edit: February 06, 2017, 10:12:26 pm by mlody87 »

benohb

  • Full Member
  • ***
  • Posts: 141
Re: Reading and wiriting to socket in SSL mode (lNet)
« Reply #1 on: February 07, 2017, 02:42:43 am »
Try example in net/examples/visual/tcpudp/

mlody87

  • New member
  • *
  • Posts: 14
Re: Reading and wiriting to socket in SSL mode (lNet)
« Reply #2 on: February 07, 2017, 08:44:18 am »
Quote
I look into demos but there is example with sending to all connected clients but I would like to identify clients and read, send data for specify one.

:)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus