Android Question Server App with Network & TCP Socket + SSL

MarkusR

Well-Known Member
Licensed User
hello,
how to make this example b4j network here work with ssl?
https://www.b4x.com/android/forum/threads/b4x-network-asyncstreams-b4xserializator.72149/

i set the server into listen after a button click.
if me click connect from "client" the server show a connect but the client stay in status disconnected.

the client get a connection reset in LastException

B4X:
'client.Initialize("client")
client.InitializeSSL("client",Null,"") '< my try
i just need a simple encryption for data transport because the connection i will make from phone via internet connection.
i will send "type" data between a desktop app and android app.
 
Last edited:

MarkusR

Well-Known Member
Licensed User
I think you need to use that method on the client unless you have an actuall (non-self signed) SSL certificate.
hmm the b4j version did not have InitializeSSLAcceptAll
me tested the network between b4j and b4j desktop app first.
my end constellation should be
windows app connected to linux app (its the same app act as client or server)
android app connected to windows/linux app
 

MarkusR

Well-Known Member
Licensed User
Is this a B4J or B4A question?
i put it here by mistake (sorry :oops:) but the b4x examples was in b4a.
currently my ssl problem is related to b4j at pc.

i attached my test project. i make the jar in release then i started it 2x at pc, in one app i click the start listen button. then i try to send a message.

after searching here in forum maybe i will switch my project into WebSockets.
 

Attachments

Last edited:

Erel

Administrator
Staff member
Licensed User
It will not work as ServerSocket accepts non-SSL connections. Build a real server with jServer instead.
 

MarkusR

Well-Known Member
Licensed User
ok, i found a example WebAppHelloWorld
its possible to mix a gui app with jServer ?
 
Top