Android Question Server App with Network & TCP Socket + SSL

Discussion in 'Android Questions' started by MarkusR, Aug 20, 2018.

  1. MarkusR

    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

    Code:
    '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: Aug 20, 2018
  2. OliverA

    OliverA Well-Known Member Licensed User

  3. MarkusR

    MarkusR Well-Known Member Licensed User

    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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Is this a B4J or B4A question?
     
  5. MarkusR

    MarkusR Well-Known Member Licensed User

    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.
     

    Attached Files:

    Last edited: Aug 21, 2018
  6. Erel

    Erel Administrator Staff Member Licensed User

    It will not work as ServerSocket accepts non-SSL connections. Build a real server with jServer instead.
     
    MarkusR likes this.
  7. MarkusR

    MarkusR Well-Known Member Licensed User

    ok, i found a example WebAppHelloWorld
    its possible to mix a gui app with jServer ?
     
  8. OliverA

    OliverA Well-Known Member Licensed User

  9. MarkusR

    MarkusR Well-Known Member Licensed User

    aha, but what is the reasion that it not work in a b4j gui app?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    You should start a new thread for a new question.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice