B4J Question SSL Socket and B4J

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi all,

In B4a I see the library SSLSocket.

Is this also for B4J or how can this be done.
I need to Connect to a TCP Server(IO-Device) with SSL/TLS.

Thanks for help.
 

potman100

Active Member
Licensed User
Longtime User
Hi swissmade

Have had a quick play and the socket is connecting ok, wil do some further testing and let you know.

Regards

Potman
 
Last edited:
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi Potman
I have not any problem with it.
The Server has a SSL connection and listen on port 10001.

Hope you can use this.
Happy to hear.
B4X:
Sub Proess Globals
  Private SSLStream As AsyncStreamsSSL 'AsyncStreams
  Private Client As SocketSSL ' Socket

End Sub

Client.Initialize("Client")
If Client.IsInitialized = True Then
    Client.Connect("192.168.1.205", 10001, 10000)
End If   

Sub Client_Connected (Successful As Boolean)

If Successful  = True Then
   ConnectClient 'Connect Stream
End If
End Sub

Sub ConnectClient
     If SSLStream.IsInitialized = True Then
       SSLStream.Close
     End If   
     If SSLStream.IsInitialized = False Then
       SSLStream.Initialize(Client.InputStream, Client.OutputStream, "SSLStream")
     End If   
End Sub
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi All,
I Add some new features to the SSLSocket a new version 1.10.
Two Items has been added.
Property TAG and Property ArrayIndex.

I hope somebody can use this
 

Attachments

  • JSockSSL.zip
    9.4 KB · Views: 245
Last edited:
Upvote 0
Top