Diff
Modified: trunk/Source/WebCore/ChangeLog (93855 => 93856)
--- trunk/Source/WebCore/ChangeLog 2011-08-26 06:44:14 UTC (rev 93855)
+++ trunk/Source/WebCore/ChangeLog 2011-08-26 06:48:34 UTC (rev 93856)
@@ -1,3 +1,28 @@
+2011-08-25 Yuta Kitamura <[email protected]>
+
+ WebSocket: Fix indentation of WebSocket header files
+ https://bugs.webkit.org/show_bug.cgi?id=67018
+
+ Reviewed by Kent Tamura.
+
+ No new tests. Style fix only.
+
+ * websockets/WebSocket.h:
+ (WebCore::WebSocket::create):
+ (WebCore::WebSocket::toWebSocket):
+ (WebCore::WebSocket::refEventTarget):
+ (WebCore::WebSocket::derefEventTarget):
+ * websockets/WebSocketChannel.h:
+ Removed formal parameter name of resumeTimerFired().
+ (WebCore::WebSocketChannel::create):
+ (WebCore::WebSocketChannel::refThreadableWebSocketChannel):
+ (WebCore::WebSocketChannel::derefThreadableWebSocketChannel):
+ (WebCore::WebSocketChannel::isNonControlOpCode):
+ (WebCore::WebSocketChannel::isControlOpCode):
+ (WebCore::WebSocketChannel::isReservedOpCode):
+ * websockets/WebSocketHandshake.h:
+ Removed formal parameter name of setClientProtocol().
+
2011-08-25 Martin Robinson <[email protected]>
Touch GtkVersioning.c so that the release bot rebuilds it. This
Modified: trunk/Source/WebCore/websockets/WebSocket.h (93855 => 93856)
--- trunk/Source/WebCore/websockets/WebSocket.h 2011-08-26 06:44:14 UTC (rev 93855)
+++ trunk/Source/WebCore/websockets/WebSocket.h 2011-08-26 06:48:34 UTC (rev 93856)
@@ -46,87 +46,87 @@
namespace WebCore {
- class ThreadableWebSocketChannel;
+class ThreadableWebSocketChannel;
- class WebSocket : public RefCounted<WebSocket>, public EventTarget, public ActiveDOMObject, public WebSocketChannelClient {
- public:
- static void setIsAvailable(bool);
- static bool isAvailable();
- static PassRefPtr<WebSocket> create(ScriptExecutionContext* context) { return adoptRef(new WebSocket(context)); }
- virtual ~WebSocket();
+class WebSocket : public RefCounted<WebSocket>, public EventTarget, public ActiveDOMObject, public WebSocketChannelClient {
+public:
+ static void setIsAvailable(bool);
+ static bool isAvailable();
+ static PassRefPtr<WebSocket> create(ScriptExecutionContext* context) { return adoptRef(new WebSocket(context)); }
+ virtual ~WebSocket();
- enum State {
- CONNECTING = 0,
- OPEN = 1,
- CLOSING = 2,
- CLOSED = 3
- };
+ enum State {
+ CONNECTING = 0,
+ OPEN = 1,
+ CLOSING = 2,
+ CLOSED = 3
+ };
- void connect(const String& url, ExceptionCode&);
- void connect(const String& url, const String& protocol, ExceptionCode&);
- void connect(const String& url, const Vector<String>& protocols, ExceptionCode&);
+ void connect(const String& url, ExceptionCode&);
+ void connect(const String& url, const String& protocol, ExceptionCode&);
+ void connect(const String& url, const Vector<String>& protocols, ExceptionCode&);
- bool send(const String& message, ExceptionCode&);
+ bool send(const String& message, ExceptionCode&);
- void close();
+ void close();
- const KURL& url() const;
- State readyState() const;
- unsigned long bufferedAmount() const;
+ const KURL& url() const;
+ State readyState() const;
+ unsigned long bufferedAmount() const;
- String protocol() const;
+ String protocol() const;
- String binaryType() const;
- void setBinaryType(const String& binaryType, ExceptionCode&);
+ String binaryType() const;
+ void setBinaryType(const String& binaryType, ExceptionCode&);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(open);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(open);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
- // EventTarget
- virtual WebSocket* toWebSocket() { return this; }
+ // EventTarget
+ virtual WebSocket* toWebSocket() { return this; }
- virtual ScriptExecutionContext* scriptExecutionContext() const;
- virtual void contextDestroyed();
- virtual bool canSuspend() const;
- virtual void suspend(ReasonForSuspension);
- virtual void resume();
- virtual void stop();
+ virtual ScriptExecutionContext* scriptExecutionContext() const;
+ virtual void contextDestroyed();
+ virtual bool canSuspend() const;
+ virtual void suspend(ReasonForSuspension);
+ virtual void resume();
+ virtual void stop();
- using RefCounted<WebSocket>::ref;
- using RefCounted<WebSocket>::deref;
+ using RefCounted<WebSocket>::ref;
+ using RefCounted<WebSocket>::deref;
- // WebSocketChannelClient
- virtual void didConnect();
- virtual void didReceiveMessage(const String& message);
- virtual void didReceiveMessageError();
- virtual void didStartClosingHandshake();
- virtual void didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason);
+ // WebSocketChannelClient
+ virtual void didConnect();
+ virtual void didReceiveMessage(const String& message);
+ virtual void didReceiveMessageError();
+ virtual void didStartClosingHandshake();
+ virtual void didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason);
- private:
- WebSocket(ScriptExecutionContext*);
+private:
+ WebSocket(ScriptExecutionContext*);
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData();
- virtual EventTargetData* ensureEventTargetData();
+ virtual void refEventTarget() { ref(); }
+ virtual void derefEventTarget() { deref(); }
+ virtual EventTargetData* eventTargetData();
+ virtual EventTargetData* ensureEventTargetData();
- enum BinaryType {
- BinaryTypeBlob,
- BinaryTypeArrayBuffer
- };
+ enum BinaryType {
+ BinaryTypeBlob,
+ BinaryTypeArrayBuffer
+ };
- RefPtr<ThreadableWebSocketChannel> m_channel;
+ RefPtr<ThreadableWebSocketChannel> m_channel;
- State m_state;
- KURL m_url;
- EventTargetData m_eventTargetData;
- unsigned long m_bufferedAmountAfterClose;
- BinaryType m_binaryType;
- bool m_useHixie76Protocol;
- String m_subprotocol;
- };
+ State m_state;
+ KURL m_url;
+ EventTargetData m_eventTargetData;
+ unsigned long m_bufferedAmountAfterClose;
+ BinaryType m_binaryType;
+ bool m_useHixie76Protocol;
+ String m_subprotocol;
+};
} // namespace WebCore
Modified: trunk/Source/WebCore/websockets/WebSocketChannel.h (93855 => 93856)
--- trunk/Source/WebCore/websockets/WebSocketChannel.h 2011-08-26 06:44:14 UTC (rev 93855)
+++ trunk/Source/WebCore/websockets/WebSocketChannel.h 2011-08-26 06:48:34 UTC (rev 93856)
@@ -44,178 +44,178 @@
namespace WebCore {
- class ScriptExecutionContext;
- class SocketStreamHandle;
- class SocketStreamError;
- class WebSocketChannelClient;
+class ScriptExecutionContext;
+class SocketStreamHandle;
+class SocketStreamError;
+class WebSocketChannelClient;
- class WebSocketChannel : public RefCounted<WebSocketChannel>, public SocketStreamHandleClient, public ThreadableWebSocketChannel {
- WTF_MAKE_FAST_ALLOCATED;
- public:
- static PassRefPtr<WebSocketChannel> create(ScriptExecutionContext* context, WebSocketChannelClient* client) { return adoptRef(new WebSocketChannel(context, client)); }
- virtual ~WebSocketChannel();
+class WebSocketChannel : public RefCounted<WebSocketChannel>, public SocketStreamHandleClient, public ThreadableWebSocketChannel {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassRefPtr<WebSocketChannel> create(ScriptExecutionContext* context, WebSocketChannelClient* client) { return adoptRef(new WebSocketChannel(context, client)); }
+ virtual ~WebSocketChannel();
- virtual bool useHixie76Protocol();
- virtual void connect(const KURL&, const String& protocol);
- virtual String subprotocol();
- virtual bool send(const String& message);
- virtual unsigned long bufferedAmount() const;
- virtual void close(); // Start closing handshake.
- virtual void fail(const String& reason);
- virtual void disconnect();
+ virtual bool useHixie76Protocol();
+ virtual void connect(const KURL&, const String& protocol);
+ virtual String subprotocol();
+ virtual bool send(const String& message);
+ virtual unsigned long bufferedAmount() const;
+ virtual void close(); // Start closing handshake.
+ virtual void fail(const String& reason);
+ virtual void disconnect();
- virtual void suspend();
- virtual void resume();
+ virtual void suspend();
+ virtual void resume();
- // SocketStreamHandleClient functions.
- virtual void didOpenSocketStream(SocketStreamHandle*);
- virtual void didCloseSocketStream(SocketStreamHandle*);
- virtual void didReceiveSocketStreamData(SocketStreamHandle*, const char*, int);
- virtual void didFailSocketStream(SocketStreamHandle*, const SocketStreamError&);
- virtual void didReceiveAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&);
- virtual void didCancelAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&);
+ // SocketStreamHandleClient functions.
+ virtual void didOpenSocketStream(SocketStreamHandle*);
+ virtual void didCloseSocketStream(SocketStreamHandle*);
+ virtual void didReceiveSocketStreamData(SocketStreamHandle*, const char*, int);
+ virtual void didFailSocketStream(SocketStreamHandle*, const SocketStreamError&);
+ virtual void didReceiveAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&);
+ virtual void didCancelAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&);
- enum CloseEventCode {
- CloseEventCodeNormalClosure = 1000,
- CloseEventCodeGoingAway = 1001,
- CloseEventCodeProtocolError = 1002,
- CloseEventCodeUnsupportedData = 1003,
- CloseEventCodeFrameTooLarge = 1004,
- CloseEventCodeNoStatusRcvd = 1005,
- CloseEventCodeAbnormalClosure = 1006,
- CloseEventCodeInvalidUTF8 = 1007
- };
+ enum CloseEventCode {
+ CloseEventCodeNormalClosure = 1000,
+ CloseEventCodeGoingAway = 1001,
+ CloseEventCodeProtocolError = 1002,
+ CloseEventCodeUnsupportedData = 1003,
+ CloseEventCodeFrameTooLarge = 1004,
+ CloseEventCodeNoStatusRcvd = 1005,
+ CloseEventCodeAbnormalClosure = 1006,
+ CloseEventCodeInvalidUTF8 = 1007
+ };
- using RefCounted<WebSocketChannel>::ref;
- using RefCounted<WebSocketChannel>::deref;
+ using RefCounted<WebSocketChannel>::ref;
+ using RefCounted<WebSocketChannel>::deref;
- protected:
- virtual void refThreadableWebSocketChannel() { ref(); }
- virtual void derefThreadableWebSocketChannel() { deref(); }
+protected:
+ virtual void refThreadableWebSocketChannel() { ref(); }
+ virtual void derefThreadableWebSocketChannel() { deref(); }
- private:
- WebSocketChannel(ScriptExecutionContext*, WebSocketChannelClient*);
+private:
+ WebSocketChannel(ScriptExecutionContext*, WebSocketChannelClient*);
- bool appendToBuffer(const char* data, size_t len);
- void skipBuffer(size_t len);
- bool processBuffer();
- void resumeTimerFired(Timer<WebSocketChannel>* timer);
- void startClosingHandshake();
- void closingTimerFired(Timer<WebSocketChannel>*);
+ bool appendToBuffer(const char* data, size_t len);
+ void skipBuffer(size_t len);
+ bool processBuffer();
+ void resumeTimerFired(Timer<WebSocketChannel>*);
+ void startClosingHandshake();
+ void closingTimerFired(Timer<WebSocketChannel>*);
- // Hybi-10 opcodes.
- typedef unsigned int OpCode;
- static const OpCode OpCodeContinuation;
- static const OpCode OpCodeText;
- static const OpCode OpCodeBinary;
- static const OpCode OpCodeClose;
- static const OpCode OpCodePing;
- static const OpCode OpCodePong;
+ // Hybi-10 opcodes.
+ typedef unsigned int OpCode;
+ static const OpCode OpCodeContinuation;
+ static const OpCode OpCodeText;
+ static const OpCode OpCodeBinary;
+ static const OpCode OpCodeClose;
+ static const OpCode OpCodePing;
+ static const OpCode OpCodePong;
- static bool isNonControlOpCode(OpCode opCode) { return opCode == OpCodeContinuation || opCode == OpCodeText || opCode == OpCodeBinary; }
- static bool isControlOpCode(OpCode opCode) { return opCode == OpCodeClose || opCode == OpCodePing || opCode == OpCodePong; }
- static bool isReservedOpCode(OpCode opCode) { return !isNonControlOpCode(opCode) && !isControlOpCode(opCode); }
+ static bool isNonControlOpCode(OpCode opCode) { return opCode == OpCodeContinuation || opCode == OpCodeText || opCode == OpCodeBinary; }
+ static bool isControlOpCode(OpCode opCode) { return opCode == OpCodeClose || opCode == OpCodePing || opCode == OpCodePong; }
+ static bool isReservedOpCode(OpCode opCode) { return !isNonControlOpCode(opCode) && !isControlOpCode(opCode); }
- enum ParseFrameResult {
- FrameOK,
- FrameIncomplete,
- FrameError
- };
+ enum ParseFrameResult {
+ FrameOK,
+ FrameIncomplete,
+ FrameError
+ };
- struct FrameData {
- OpCode opCode;
- bool final;
- bool reserved1;
- bool reserved2;
- bool reserved3;
- bool masked;
- const char* payload;
- size_t payloadLength;
- const char* frameEnd;
- };
+ struct FrameData {
+ OpCode opCode;
+ bool final;
+ bool reserved1;
+ bool reserved2;
+ bool reserved3;
+ bool masked;
+ const char* payload;
+ size_t payloadLength;
+ const char* frameEnd;
+ };
- ParseFrameResult parseFrame(FrameData&); // May modify part of m_buffer to unmask the frame.
+ ParseFrameResult parseFrame(FrameData&); // May modify part of m_buffer to unmask the frame.
- bool processFrame();
- bool processFrameHixie76();
+ bool processFrame();
+ bool processFrameHixie76();
- // It is allowed to send a Blob as a binary frame if hybi-10 protocol is in use. Sending a Blob
- // can be delayed because it must be read asynchronously. Other types of data (String or
- // ArrayBuffer) may also be blocked by preceding sending request of a Blob.
- //
- // To address this situation, messages to be sent need to be stored in a queue. Whenever a new
- // data frame is going to be sent, it first must go to the queue. Items in the queue are processed
- // in the order they were put into the queue. Sending request of a Blob blocks further processing
- // until the Blob is completely read and sent to the socket stream.
- //
- // When hixie-76 protocol is chosen, the queue is not used and messages are sent directly.
- enum QueuedFrameType {
- QueuedFrameTypeString,
- QueuedFrameTypeVector
- // FIXME: Add QueuedFrameTypeBlob.
- };
- struct QueuedFrame {
- OpCode opCode;
- QueuedFrameType frameType;
- // Only one of the following items is used, according to the value of frameType.
- String stringData;
- Vector<char> vectorData;
- // FIXME: Add blobData.
- };
- void enqueueTextFrame(const String&);
- void enqueueRawFrame(OpCode, const char* data, size_t dataLength);
- // FIXME: Add enqueueBlobFrame().
+ // It is allowed to send a Blob as a binary frame if hybi-10 protocol is in use. Sending a Blob
+ // can be delayed because it must be read asynchronously. Other types of data (String or
+ // ArrayBuffer) may also be blocked by preceding sending request of a Blob.
+ //
+ // To address this situation, messages to be sent need to be stored in a queue. Whenever a new
+ // data frame is going to be sent, it first must go to the queue. Items in the queue are processed
+ // in the order they were put into the queue. Sending request of a Blob blocks further processing
+ // until the Blob is completely read and sent to the socket stream.
+ //
+ // When hixie-76 protocol is chosen, the queue is not used and messages are sent directly.
+ enum QueuedFrameType {
+ QueuedFrameTypeString,
+ QueuedFrameTypeVector
+ // FIXME: Add QueuedFrameTypeBlob.
+ };
+ struct QueuedFrame {
+ OpCode opCode;
+ QueuedFrameType frameType;
+ // Only one of the following items is used, according to the value of frameType.
+ String stringData;
+ Vector<char> vectorData;
+ // FIXME: Add blobData.
+ };
+ void enqueueTextFrame(const String&);
+ void enqueueRawFrame(OpCode, const char* data, size_t dataLength);
+ // FIXME: Add enqueueBlobFrame().
- void processOutgoingFrameQueue();
- void abortOutgoingFrameQueue();
+ void processOutgoingFrameQueue();
+ void abortOutgoingFrameQueue();
- enum OutgoingFrameQueueStatus {
- // It is allowed to put a new item into the queue.
- OutgoingFrameQueueOpen,
- // Close frame has already been put into the queue but may not have been sent yet;
- // m_handle->close() will be called as soon as the queue is cleared. It is not
- // allowed to put a new item into the queue.
- OutgoingFrameQueueClosing,
- // Close frame has been sent or the queue was aborted. It is not allowed to put
- // a new item to the queue.
- OutgoingFrameQueueClosed
- };
+ enum OutgoingFrameQueueStatus {
+ // It is allowed to put a new item into the queue.
+ OutgoingFrameQueueOpen,
+ // Close frame has already been put into the queue but may not have been sent yet;
+ // m_handle->close() will be called as soon as the queue is cleared. It is not
+ // allowed to put a new item into the queue.
+ OutgoingFrameQueueClosing,
+ // Close frame has been sent or the queue was aborted. It is not allowed to put
+ // a new item to the queue.
+ OutgoingFrameQueueClosed
+ };
- // If you are going to send a hybi-10 frame, you need to use the outgoing frame queue
- // instead of call sendFrame() directly.
- bool sendFrame(OpCode, const char* data, size_t dataLength);
- bool sendFrameHixie76(const char* data, size_t dataLength);
+ // If you are going to send a hybi-10 frame, you need to use the outgoing frame queue
+ // instead of call sendFrame() directly.
+ bool sendFrame(OpCode, const char* data, size_t dataLength);
+ bool sendFrameHixie76(const char* data, size_t dataLength);
- ScriptExecutionContext* m_context;
- WebSocketChannelClient* m_client;
- OwnPtr<WebSocketHandshake> m_handshake;
- RefPtr<SocketStreamHandle> m_handle;
- char* m_buffer;
- size_t m_bufferSize;
+ ScriptExecutionContext* m_context;
+ WebSocketChannelClient* m_client;
+ OwnPtr<WebSocketHandshake> m_handshake;
+ RefPtr<SocketStreamHandle> m_handle;
+ char* m_buffer;
+ size_t m_bufferSize;
- Timer<WebSocketChannel> m_resumeTimer;
- bool m_suspended;
- bool m_closing;
- bool m_receivedClosingHandshake;
- Timer<WebSocketChannel> m_closingTimer;
- bool m_closed;
- bool m_shouldDiscardReceivedData;
- unsigned long m_unhandledBufferedAmount;
+ Timer<WebSocketChannel> m_resumeTimer;
+ bool m_suspended;
+ bool m_closing;
+ bool m_receivedClosingHandshake;
+ Timer<WebSocketChannel> m_closingTimer;
+ bool m_closed;
+ bool m_shouldDiscardReceivedData;
+ unsigned long m_unhandledBufferedAmount;
- unsigned long m_identifier; // m_identifier == 0 means that we could not obtain a valid identifier.
+ unsigned long m_identifier; // m_identifier == 0 means that we could not obtain a valid identifier.
- bool m_useHixie76Protocol;
+ bool m_useHixie76Protocol;
- // Private members only for hybi-10 protocol.
- bool m_hasContinuousFrame;
- OpCode m_continuousFrameOpCode;
- Vector<char> m_continuousFrameData;
- unsigned short m_closeEventCode;
- String m_closeEventReason;
+ // Private members only for hybi-10 protocol.
+ bool m_hasContinuousFrame;
+ OpCode m_continuousFrameOpCode;
+ Vector<char> m_continuousFrameData;
+ unsigned short m_closeEventCode;
+ String m_closeEventReason;
- Deque<OwnPtr<QueuedFrame> > m_outgoingFrameQueue;
- OutgoingFrameQueueStatus m_outgoingFrameQueueStatus;
- };
+ Deque<OwnPtr<QueuedFrame> > m_outgoingFrameQueue;
+ OutgoingFrameQueueStatus m_outgoingFrameQueueStatus;
+};
} // namespace WebCore
Modified: trunk/Source/WebCore/websockets/WebSocketHandshake.h (93855 => 93856)
--- trunk/Source/WebCore/websockets/WebSocketHandshake.h 2011-08-26 06:44:14 UTC (rev 93855)
+++ trunk/Source/WebCore/websockets/WebSocketHandshake.h 2011-08-26 06:48:34 UTC (rev 93856)
@@ -40,83 +40,83 @@
namespace WebCore {
- class ScriptExecutionContext;
+class ScriptExecutionContext;
- class WebSocketHandshake {
- WTF_MAKE_NONCOPYABLE(WebSocketHandshake);
- public:
- enum Mode {
- Incomplete, Normal, Failed, Connected
- };
- WebSocketHandshake(const KURL&, const String& protocol, ScriptExecutionContext*, bool useHixie76Protocol);
- ~WebSocketHandshake();
+class WebSocketHandshake {
+ WTF_MAKE_NONCOPYABLE(WebSocketHandshake);
+public:
+ enum Mode {
+ Incomplete, Normal, Failed, Connected
+ };
+ WebSocketHandshake(const KURL&, const String& protocol, ScriptExecutionContext*, bool useHixie76Protocol);
+ ~WebSocketHandshake();
- const KURL& url() const;
- void setURL(const KURL&);
- const String host() const;
+ const KURL& url() const;
+ void setURL(const KURL&);
+ const String host() const;
- const String& clientProtocol() const;
- void setClientProtocol(const String& protocol);
+ const String& clientProtocol() const;
+ void setClientProtocol(const String&);
- bool secure() const;
+ bool secure() const;
- String clientOrigin() const;
- String clientLocation() const;
+ String clientOrigin() const;
+ String clientLocation() const;
- CString clientHandshakeMessage() const;
- WebSocketHandshakeRequest clientHandshakeRequest() const;
+ CString clientHandshakeMessage() const;
+ WebSocketHandshakeRequest clientHandshakeRequest() const;
- void reset();
- void clearScriptExecutionContext();
+ void reset();
+ void clearScriptExecutionContext();
- int readServerHandshake(const char* header, size_t len);
- Mode mode() const;
- String failureReason() const; // Returns a string indicating the reason of failure if mode() == Failed.
+ int readServerHandshake(const char* header, size_t len);
+ Mode mode() const;
+ String failureReason() const; // Returns a string indicating the reason of failure if mode() == Failed.
- String serverWebSocketOrigin() const; // Only for hixie-76 handshake.
- String serverWebSocketLocation() const; // Only for hixie-76 handshake.
- String serverWebSocketProtocol() const;
- String serverSetCookie() const;
- String serverSetCookie2() const;
- String serverUpgrade() const;
- String serverConnection() const;
- String serverWebSocketAccept() const; // Only for hybi-10 handshake.
- String serverWebSocketExtensions() const; // Only for hybi-10 handshake.
+ String serverWebSocketOrigin() const; // Only for hixie-76 handshake.
+ String serverWebSocketLocation() const; // Only for hixie-76 handshake.
+ String serverWebSocketProtocol() const;
+ String serverSetCookie() const;
+ String serverSetCookie2() const;
+ String serverUpgrade() const;
+ String serverConnection() const;
+ String serverWebSocketAccept() const; // Only for hybi-10 handshake.
+ String serverWebSocketExtensions() const; // Only for hybi-10 handshake.
- const WebSocketHandshakeResponse& serverHandshakeResponse() const;
+ const WebSocketHandshakeResponse& serverHandshakeResponse() const;
- private:
- KURL httpURLForAuthenticationAndCookies() const;
+private:
+ KURL httpURLForAuthenticationAndCookies() const;
- int readStatusLine(const char* header, size_t headerLength, int& statusCode, String& statusText);
+ int readStatusLine(const char* header, size_t headerLength, int& statusCode, String& statusText);
- // Reads all headers except for the two predefined ones.
- const char* readHTTPHeaders(const char* start, const char* end);
- void processHeaders();
- bool checkResponseHeaders();
+ // Reads all headers except for the two predefined ones.
+ const char* readHTTPHeaders(const char* start, const char* end);
+ void processHeaders();
+ bool checkResponseHeaders();
- KURL m_url;
- String m_clientProtocol;
- bool m_secure;
- ScriptExecutionContext* m_context;
- bool m_useHixie76Protocol;
+ KURL m_url;
+ String m_clientProtocol;
+ bool m_secure;
+ ScriptExecutionContext* m_context;
+ bool m_useHixie76Protocol;
- Mode m_mode;
+ Mode m_mode;
- WebSocketHandshakeResponse m_response;
+ WebSocketHandshakeResponse m_response;
- String m_failureReason;
+ String m_failureReason;
- // For hixie-76 handshake.
- String m_hixie76SecWebSocketKey1;
- String m_hixie76SecWebSocketKey2;
- unsigned char m_hixie76Key3[8];
- unsigned char m_hixie76ExpectedChallengeResponse[16];
+ // For hixie-76 handshake.
+ String m_hixie76SecWebSocketKey1;
+ String m_hixie76SecWebSocketKey2;
+ unsigned char m_hixie76Key3[8];
+ unsigned char m_hixie76ExpectedChallengeResponse[16];
- // For hybi-10 handshake.
- String m_secWebSocketKey;
- String m_expectedAccept;
- };
+ // For hybi-10 handshake.
+ String m_secWebSocketKey;
+ String m_expectedAccept;
+};
} // namespace WebCore