I am trying to get a simple java connection. However I am unable to establish the connection. I think I am missing a step.
I have set up the CTX on the client side. On the server I can connect via C++.
My code look like this:
String SrvAddr_main;
String SrvPort_main;
SrvAddr_main = "192.168.1.7";
SrvPort_main = "3535";
sock = new Socket(SrvAddr_main, Integer.parseInt( SrvPort_main ));
outstream = new DataOutputStream(sock.getOutputStream());
instream = new DataInputStream(sock.getInputStream());
SSL_main.setFd(sock);
SSL_main = new WolfSSLSession( Ctx );
int ret = SSL_main.connect();
String msg = "Hello";
ret = SSL_main.write(msg.getBytes(), msg.length());
I do not get any errors but the message never gets to server. I am thinking I need to use the instream, outstream for something?
Thank you