Jump to content

Is TSslContext yet required with TSslWSocket (Client side)

Recommended Posts



I am using TSslWSocket (TSslContext) to connect to TSslWSocketServer (using IcsHosts)

Is it possible to avoid TSslContext on Client Side too ?


I am asking because the Client side loses out some data initially upon just connecting.

Without SSL same code work fine.

I tried to prepare a small sample but that works fine with SSL too.


I am using Delphi Seattle on Windows 10, Single machine, Two Exe's (Server and Client) for testing




Share this post

Link to post

No, TSslWSocket still needs an TSslContext, although you don't usually need to change any defaults unless you want to restrict protocols. 


However, you can use the high level component TIcsIpStrmLog in client mode to send and receive simple data, and that does not need an TSslContext.  It's sample OverbyteIcsIpStmLogTst.dpr can be set to client or server mode, or local when it does both and send lines of data to itself.  In server mode it is configured using IcsHosts so it might be a quick swap.




Share this post

Link to post

My mistake was that I was sending first message to the Client from within the TSslWSocketServer.DataAvailable event. Took that off and it is now working perfectly. 


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now