cancel
Showing results for 
Search instead for 
Did you mean: 

Java client as connection acceptor

SteveTownsend0
New Contributor
I've seen the Java echo server example at https://github.com/KxSystems/javakdb/blob/master/src/kx/examples/Server.java. My related use case is where the KDB+ server is not allowed to accept an incoming connection - I need it to connect to a listening Java client, which then writes data into KDB+ via a kx.C instance that is instantiated using ServerSocket.  Will this work?  The code already works in 'client connects' mode - just need to know whether I can have the KDB+ process make the connection and everything else just works once the kx.C instance is prepared with a live socket between Java client and KDB+.
2 REPLIES 2

quintanar401
New Contributor
I don't know about this kx Java class but it is easy to establish a connection with a Q process - it sends a user name and a password and you need to send back true or false. After this handshake everything goes as usual.

вторник, 23 января 2018 г., 23:38:45 UTC+3 пользователь Stephen Townsend написал:
I've seen the Java echo server example at https://github.com/KxSystems/javakdb/blob/master/src/kx/examples/Server.java. My related use case is where the KDB+ server is not allowed to accept an incoming connection - I need it to connect to a listening Java client, which then writes data into KDB+ via a kx.C instance that is instantiated using ServerSocket.  Will this work?  The code already works in 'client connects' mode - just need to know whether I can have the KDB+ process make the connection and everything else just works once the kx.C instance is prepared with a live socket between Java client and KDB+.