What is the difference between client-side connection and server-side connection - java

I am fairly new to the web development, I have been going over the release notes of the Java on different platforms like linux (oracle hotspot), AIX and hp-ux. I am actually investigating around the TLS support of each version of java on those platforms. I am coming across information(Java 8, AIX) showing the support for client-side connections and server-side connections. What I do not understand is what is the difference between them.
Does it simply mean that the client trying to connect to a server and the other is server trying to connect to a client? If that is the case why is the TLS support different for both of those connections. I would like to understand the general difference between both of them and what it has to do with the TLS support.

Related

Can java.net.http.HttpClient talk to a unix socked?

I'd like to use java.net.http.HttpClient instead of curl to perform the http examples list here:
https://docs.docker.com/engine/api/sdk/examples/
Is there a way to do this?
The JDK does not support Unix Domain Socket connections yet (JEP 380 will add this feature). But regardless of that it appears java.net.http.HttpClient only supports URIs (but not SocketAddress) as destination, therefore it would not work anyways.
There are however libraries which offer this functionality:
junixsocket (relevant issue)
Reactor Netty
Netty: How do I connect to a UNIX domain socket running an HTTP server using Netty?
unix-socket-factory (for Apache HttpClient)
However, since your goal is to connect to Docker, it would be easiest to use one of the available Java Docker clients.

J2SSH supported ciphers/Macs

I am running a java application which uses J2ssh library to establish the connection to the server.
Last week we migrated to a new IBM server
Here the problem is we are unable to establish FTP/SFTP connection to the new server from my java application. But the connectivity is working fine from other tools.
My doubt is whether the J2SSH library will support the below ciphers/macs ? because these are the ciphers configured in the new IBM server.
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128
MACs hmac-sha1,umac-64#openssh.com,hmac-ripemd160
It sounds like your using a very outdated version of J2SSH.
You should upgrade to the more recent open source version J2SSH Maverick that supports counter mode ciphers.

SSH protocol version

Currently my application is working with J2SSH and now clients wants to migrate the existing server to IBM. This new server will support only SSH protocol version 2.
I have a query whether J2SSH will support SSH protocol version 2 ?.
Is there a way to find SSH protocol version in my application, currently my application is coded in Java environment with J2SSH for SSH/SFTP channels.
The original open source version of J2SSH only supports the SSH2 protocol. If you attempt to connect to an SSH1 server it will simply fail with a connection exception.
For security reasons you should probably consider migrating your code to the open source version of J2SSH Maverick. This is a similar API from the same author (that's me btw); the difference being that the new API is maintained and current whereas J2SSH has not been maintained for some time as its last release was in 2007.

Porting java sockets client to HTML5 socket.io

I have a multi-player game that uses Java sockets, the server is a standard Java application and the client is a Java applet that runs in the web-browser.
Now since last Java's update (Java 7 update 51) all applets require code signing, so I would like to move way from the applet and rewrite the client in HTML5.
I've been looking into the socket.io and it seems quite easy, but I can't find any information on how to implement it into my server.
I would like to keep the server in Java, because it will be a lot of work to port it, so is there any libs that I could use on my server to make the communication possible between a java sockets server and a socket.io client, or what is the best approach? do I really need to port the entirely server?
Thanks.
The html5 WebSocket on which socket.io works is not equal to a "normal" C or Java socket. It implements its own protocol over TCP which includes handshakes and other stuff. To port your server you have to use a library maybe this helps you.
For more information on the WebSocket protocol see here.

How to connect to FTP in a Java EE compliant way?

According to the Java EE (EJB) spec, it is not allowed to "listen on a socket, accept connections on a socket, or use a socket for multicast".
What is the Java EE compliant way to open a FTP connection?
I'd say a Java EE compliant way to make an FTP connection is through Java EE Connector Architecture(JCA) by using the appropriate ftp adapter.
However the support for JCA is mostly left to the Application Server vendor and I am not sure about the portability your code will have.

Categories