OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 CloseEventCodeInvalidFramePayloadData = 1007, | 68 CloseEventCodeInvalidFramePayloadData = 1007, |
69 CloseEventCodePolicyViolation = 1008, | 69 CloseEventCodePolicyViolation = 1008, |
70 CloseEventCodeMessageTooBig = 1009, | 70 CloseEventCodeMessageTooBig = 1009, |
71 CloseEventCodeMandatoryExt = 1010, | 71 CloseEventCodeMandatoryExt = 1010, |
72 CloseEventCodeInternalError = 1011, | 72 CloseEventCodeInternalError = 1011, |
73 CloseEventCodeTLSHandshake = 1015, | 73 CloseEventCodeTLSHandshake = 1015, |
74 CloseEventCodeMinimumUserDefined = 3000, | 74 CloseEventCodeMinimumUserDefined = 3000, |
75 CloseEventCodeMaximumUserDefined = 4999 | 75 CloseEventCodeMaximumUserDefined = 4999 |
76 }; | 76 }; |
77 | 77 |
78 virtual void connect(const KURL&, const String& protocol) = 0; | 78 virtual bool connect(const KURL&, const String& protocol) = 0; |
79 virtual String subprotocol() = 0; // Will be available after didConnect() ca
llback is invoked. | 79 virtual String subprotocol() = 0; // Will be available after didConnect() ca
llback is invoked. |
80 virtual String extensions() = 0; // Will be available after didConnect() cal
lback is invoked. | 80 virtual String extensions() = 0; // Will be available after didConnect() cal
lback is invoked. |
81 virtual SendResult send(const String& message) = 0; | 81 virtual SendResult send(const String& message) = 0; |
82 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by
teLength) = 0; | 82 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by
teLength) = 0; |
83 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; | 83 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; |
84 virtual unsigned long bufferedAmount() const = 0; | 84 virtual unsigned long bufferedAmount() const = 0; |
85 virtual void close(int code, const String& reason) = 0; | 85 virtual void close(int code, const String& reason) = 0; |
86 | 86 |
87 // Log the reason text and close the connection. Will call didClose(). | 87 // Log the reason text and close the connection. Will call didClose(). |
88 // The MessageLevel parameter will be used for the level of the message | 88 // The MessageLevel parameter will be used for the level of the message |
(...skipping 19 matching lines...) Expand all Loading... |
108 | 108 |
109 protected: | 109 protected: |
110 virtual ~WebSocketChannel() { } | 110 virtual ~WebSocketChannel() { } |
111 virtual void refWebSocketChannel() = 0; | 111 virtual void refWebSocketChannel() = 0; |
112 virtual void derefWebSocketChannel() = 0; | 112 virtual void derefWebSocketChannel() = 0; |
113 }; | 113 }; |
114 | 114 |
115 } // namespace WebCore | 115 } // namespace WebCore |
116 | 116 |
117 #endif // WebSocketChannel_h | 117 #endif // WebSocketChannel_h |
OLD | NEW |