From 9aafe4d1c535e9f79c09f33d2e1a1f8cc344eaa0 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 31 Aug 2015 11:43:31 +0300 Subject: Use Transport.WEBSOCKET_XHR instead of setter for mixing websockets and XHR (#11733) Change-Id: I2fad7d367d8a4ba476ae0705672ebc2ee7cfeb1c --- .../client/communication/ServerCommunicationHandler.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/communication/ServerCommunicationHandler.java b/client/src/com/vaadin/client/communication/ServerCommunicationHandler.java index 38b3321b27..12f7dee1d1 100644 --- a/client/src/com/vaadin/client/communication/ServerCommunicationHandler.java +++ b/client/src/com/vaadin/client/communication/ServerCommunicationHandler.java @@ -328,11 +328,17 @@ public class ServerCommunicationHandler { * @return A string representation of the current transport type */ public String getCommunicationMethodName() { + String clientToServer = "XHR"; + String serverToClient = "-"; if (push != null) { - return "Push (" + push.getTransportType() + ")"; - } else { - return "XHR"; + serverToClient = push.getTransportType(); + if (push.isBidirectional()) { + clientToServer = serverToClient; + } } + + return "Client to server: " + clientToServer + ", " + + "server to client: " + serverToClient; } private CommunicationProblemHandler getCommunicationProblemHandler() { -- cgit v1.2.3