Support Board
Date/Time: Tue, 21 Jan 2025 04:14:21 +0000
Post From: Trying to run JAVA demo program
[2017-10-12 22:02:50] |
User178540 - Posts: 15 |
Thanks for the reponse, basic connection is done, yet no other message such as LOGON seems to arrive to the server: Logs: ----------------- DTC Protocol server | Incoming connection from 127.0.0.1. | 2017-10-12 22:01:09 DTCServer (74) | Creating socket. | 2017-10-12 22:01:09 DTC client #19. 127.0.0.1 | No activity on network socket. Closing network socket. | 2017-10-12 22:01:29 DTCServer (74) | Initiating close of socket by core. | 2017-10-12 22:01:29 DTCServer (74) | Shutdown started. Waiting for graceful close. | 2017-10-12 22:01:29 DTCServer (74) | Socket gracefully closed by remote side. | 2017-10-12 22:01:29 DTCServer (74) | Closed. | 2017-10-12 22:01:29 -------------------- Code: ------------------ Socket clientSocket = new Socket("127.0.0.1", 11099); if (clientSocket.isConnected()) { System.out.println("Connected. "); } LogonRequest request = LogonRequest.newBuilder() .setHeartbeatIntervalInSeconds(5) .setClientName("AnyName") .build(); request.writeTo(CodedOutputStream.newInstance(clientSocket.getOutputStream())); System.out.println("After sendin message"); LogonResponse response = LogonResponse.parseFrom(CodedInputStream.newInstance(clientSocket.getInputStream())); System.out.println(response); clientSocket.close(); ------------------------ |