Android Question Server App with Network & TCP Socket + SSL

MarkusR

Well-Known Member
Licensed User
Longtime 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:

OliverA

Expert
Licensed User
Longtime User
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime 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
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime 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

  • B4J_Network_Project.zip
    6.7 KB · Views: 306
Last edited:
Upvote 0

MarkusR

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

MarkusR

Well-Known Member
Licensed User
Longtime User
aha, but what is the reasion that it not work in a b4j gui app?
 
Upvote 0
Top