How to send plain text ScSslClient

How to send plain text ScSslClient

I want to start using ScSslClient to connect to my ICS component SslWSocketServer. Connection happens successfully. Issue is when I send some data it shows as junk (unicode characters) at the Server Side. Kindly let me know if I am sending text wrongly.


  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   wStr:String ;
  4. begin
  5.    ScSSLClient1.Connect  ;
  6.    ScSSLClient1.IsSecure := True;
  7.    wStr:='Test Data over the Socket' ;
  8.    ScSSLClient1.WriteBuffer( wStr,length(wStr)) ;
  9.    Application.ProcessMessages ;
  10.    ScSSLClient1.Disconnect ;
  11. end;

  12.   object ScSSLClient1: TScSSLClient
  13.     HostName = 'localhost'
  14.     Port = 1111
  15.     SecurityOptions.AllowLoadCRLByHttp = False
  16.     SecurityOptions.DisableCRLValidation = True
  17.     SecurityOptions.TrustSelfSignedCertificate = True
  18.   end