My first inkling is it doesn't. Looking at this snippet below it seems as if if the ping request doesn't have any application data we don't send a proper pong.
It's possible this is part of the Ping/Pong spec and I'm not aware of it.
What I would assume here is if the buffer is empty we just place the FIN | PONG flags on the buffer and send it.
|
public void createPong(ByteBuffer ping, ByteBuffer pong) { |
|
if ((ping == null) || (pong == null)) { |
|
throw new IllegalArgumentException("input parameter cannot be null"); |
|
} |
|
|
|
if (ping.capacity() > pong.capacity()) { |
|
throw new IllegalArgumentException("insufficient output buffer size"); |
|
} |
|
|
|
if (ping.remaining() > 0) { |
|
byte[] buffer = ping.array(); |
|
buffer[0] = WebSocketHeader.FINBIT_MASK | WebSocketHeader.OPCODE_PONG; |
|
|
|
pong.clear(); |
|
pong.put(buffer); |
|
} else { |
|
pong.clear(); |
|
pong.limit(0); |
|
} |
|
} |
My first inkling is it doesn't. Looking at this snippet below it seems as if if the ping request doesn't have any application data we don't send a proper pong.
It's possible this is part of the Ping/Pong spec and I'm not aware of it.
What I would assume here is if the buffer is empty we just place the FIN | PONG flags on the buffer and send it.
qpid-proton-j-extensions/src/main/java/com/microsoft/azure/proton/transport/ws/impl/WebSocketHandlerImpl.java
Lines 33 to 52 in 8c715f3