Skip to content

Commit

Permalink
Comet transport need to send the connectionID for bi-directional comm…
Browse files Browse the repository at this point in the history
…unication
  • Loading branch information
PierreH committed Oct 25, 2012
1 parent 97c8f55 commit 9e5c9fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public RPCServerTransport(AtmosphereGWTSerializer serializer) {
@Override
void send(String message, final AsyncCallback<Void> callback) {
RequestBuilder request = new RequestBuilder(RequestBuilder.POST, serviceUrl());
request.setHeader("connectionID", connectionUUID);
try {
logger.fine("Sending message to server: " + message);
request.sendRequest(message, new RequestCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ public void onRequest(AtmosphereResource resource) throws IOException {
String servertransport = request.getParameter("servertransport");
Object webSocketSubProtocol = resource.getRequest().getAttribute(FrameworkConfig.WEBSOCKET_SUBPROTOCOL);
if ("rpcprotocol".equals(servertransport)) {
doServerMessage(request, resource.getResponse(), resource.uuid());
String connectionID = request.getHeader("connectionID");
doServerMessage(request, resource.getResponse(), connectionID);
return;

} else if (webSocketSubProtocol != null
Expand Down

0 comments on commit 9e5c9fe

Please sign in to comment.