Home | History | Annotate | Download | only in websockets

Lines Matching refs:handshake

21   static void SetUpParameter(WebSocketHandshake* handshake,
32 handshake->parameter_.reset(parameter);
97 static std::string GetResourceName(WebSocketHandshake* handshake) {
98 return handshake->GetResourceName();
100 static std::string GetHostFieldValue(WebSocketHandshake* handshake) {
101 return handshake->GetHostFieldValue();
103 static std::string GetOriginFieldValue(WebSocketHandshake* handshake) {
104 return handshake->GetOriginFieldValue();
122 scoped_ptr<WebSocketHandshake> handshake(
127 SetUpParameter(handshake.get(), 777007543U, 114997259U,
131 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
134 handshake->CreateClientHandshakeMessage());
136 const char kResponse[] = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
147 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
149 EXPECT_EQ(-1, handshake->ReadServerHandshake(kResponse, 16));
150 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
154 EXPECT_EQ(-1, handshake->ReadServerHandshake(
156 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
159 EXPECT_EQ(-1, handshake->ReadServerHandshake(
161 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
164 EXPECT_EQ(-1, handshake->ReadServerHandshake(
166 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
171 EXPECT_EQ(-1, handshake->ReadServerHandshake(
173 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
176 EXPECT_EQ(-1, handshake->ReadServerHandshake(
178 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
181 EXPECT_EQ(handshake_length, handshake->ReadServerHandshake(
183 EXPECT_EQ(WebSocketHandshake::MODE_CONNECTED, handshake->mode());
198 scoped_ptr<WebSocketHandshake> handshake(
203 SetUpParameter(handshake.get(), 777007543U, 114997259U,
207 EXPECT_EQ(WebSocketHandshake::MODE_INCOMPLETE, handshake->mode());
210 handshake->CreateClientHandshakeMessage());
212 const char kResponse[] = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
223 EXPECT_EQ(handshake_length, handshake->ReadServerHandshake(
225 EXPECT_EQ(WebSocketHandshake::MODE_CONNECTED, handshake->mode());
229 scoped_ptr<WebSocketHandshake> handshake(
234 EXPECT_FALSE(handshake->is_secure());
239 scoped_ptr<WebSocketHandshake> handshake(
244 EXPECT_TRUE(handshake->is_secure());
248 scoped_ptr<WebSocketHandshake> handshake(
254 EXPECT_EQ("/Test?q=xxx&p=%20", GetResourceName(handshake.get()));
258 scoped_ptr<WebSocketHandshake> handshake(
264 EXPECT_EQ("example.com", GetHostFieldValue(handshake.get()));
265 EXPECT_EQ("http://example.com", GetOriginFieldValue(handshake.get()));
269 scoped_ptr<WebSocketHandshake> handshake(
275 EXPECT_EQ("example.com", GetHostFieldValue(handshake.get()));
279 scoped_ptr<WebSocketHandshake> handshake(
285 EXPECT_EQ("example.com", GetHostFieldValue(handshake.get()));
290 scoped_ptr<WebSocketHandshake> handshake(
296 EXPECT_EQ("example.com:8080", GetHostFieldValue(handshake.get()));
301 scoped_ptr<WebSocketHandshake> handshake(
307 EXPECT_EQ("example.com:4443", GetHostFieldValue(handshake.get()));
311 scoped_ptr<WebSocketHandshake> handshake(
317 EXPECT_EQ("example.com:443", GetHostFieldValue(handshake.get()));
321 scoped_ptr<WebSocketHandshake> handshake(
327 EXPECT_EQ("example.com:80", GetHostFieldValue(handshake.get()));