OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 222 } |
223 | 223 |
224 | 224 |
225 void DebuggerAgentSession::Shutdown() { | 225 void DebuggerAgentSession::Shutdown() { |
226 // Shutdown the socket to end the blocking receive. | 226 // Shutdown the socket to end the blocking receive. |
227 client_->Shutdown(); | 227 client_->Shutdown(); |
228 } | 228 } |
229 | 229 |
230 | 230 |
231 const char* const DebuggerAgentUtil::kContentLength = "Content-Length"; | 231 const char* const DebuggerAgentUtil::kContentLength = "Content-Length"; |
232 const int DebuggerAgentUtil::kContentLengthSize = | |
233 StrLength(kContentLength); | |
234 | 232 |
235 | 233 |
236 SmartArrayPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) { | 234 SmartArrayPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) { |
237 int received; | 235 int received; |
238 | 236 |
239 // Read header. | 237 // Read header. |
240 int content_length = 0; | 238 int content_length = 0; |
241 while (true) { | 239 while (true) { |
242 const int kHeaderBufferSize = 80; | 240 const int kHeaderBufferSize = 80; |
243 char header_buffer[kHeaderBufferSize]; | 241 char header_buffer[kHeaderBufferSize]; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 return total_received; | 439 return total_received; |
442 } | 440 } |
443 total_received += received; | 441 total_received += received; |
444 } | 442 } |
445 return total_received; | 443 return total_received; |
446 } | 444 } |
447 | 445 |
448 } } // namespace v8::internal | 446 } } // namespace v8::internal |
449 | 447 |
450 #endif // ENABLE_DEBUGGER_SUPPORT | 448 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |