Secure Sockets

I understand creating secure communications using Xojo from the client side when connecting to an HTTPS… address, but as for the server side, if one has a server socket that creates SSLSockets (properly configured to use certificates etc) when the AddSocket() event fires, will this automatically set up an SSL connection for any incoming connection?

For example, if I were to write a client app to connect to a server app configured as above, knowing its IP, could I use a TCPSocket to connect to it and have a secure connection? Do I need to use an SSL socket? Do I need to use an HTTPSocket with secure set to true?
In the cases other than the last one, how does one verify that the connection is in fact secure?

The question comes about from a conversation about using SSL on an internal network where machines are identified by IP addr, not a domain name.

Thank you

I believe that you would use a secure socket on the client side and set it’s parameters appropriately. You can connect using a secure socket and have it set to be insecure, so you need to make sure you set secure to true. Also, after the connection I believe you can check whether it’s secure or not by looking at that value.

It’s been a while since I’ve written code to do this, so I would check the docs and verify with testing as well, but I think it’s pretty straight forward.