org.kaazing.specification.ws.extensions.x-kaazing-ping-pong.client.should.disconnect.if.no.control.bytes.sent.response.rpt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of specification.x-kaazing-ping-pong Show documentation
Show all versions of specification.x-kaazing-ping-pong Show documentation
Specification for x-kaazing-ping-pong protocol
The newest version!
#
# Copyright 2007-2015, Kaazing Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
accept tcp://127.0.0.1:8001
accepted
connected
# Connection request
read "GET /echo?.kl=Y HTTP/1.1\r\n"
read "Upgrade: websocket\r\n"
read "Connection: Upgrade\r\n"
read "Host: localhost:8001\r\n"
read "Origin: http://localhost:8001\r\n"
read "Sec-WebSocket-Key: nDaimG37f4nUqogPypithw==\r\n"
read "Sec-WebSocket-Version: 13\r\n"
read "Sec-WebSocket-Extensions: x-kaazing-ping-pong\r\n"
read "\r\n"
# 101 Response
write "HTTP/1.1 101 Web Socket Protocol Handshake\r\n"
write "Connection: Upgrade\r\n"
write "Date: Fri, 31 Dec 1999 23:59:59 GMT\r\n"
write "Sec-WebSocket-Accept: TXCKJSpylVJ7v9ZGLGbt58vypzE=\r\n"
# The 4 control bytes for ping-pong extension are 0x01010102:
write "Sec-WebSocket-Extensions: x-kaazing-ping-pong"
write "\r\n"
write "Server: Kaazing Gateway\r\n"
write "Upgrade: websocket\r\n"
write "\r\n"
# Expect the client to fail the connection
closed
© 2015 - 2024 Weber Informatics LLC | Privacy Policy