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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 CloseEventCodeTLSHandshake = 1015, | 70 CloseEventCodeTLSHandshake = 1015, |
71 CloseEventCodeMinimumUserDefined = 3000, | 71 CloseEventCodeMinimumUserDefined = 3000, |
72 CloseEventCodeMaximumUserDefined = 4999 | 72 CloseEventCodeMaximumUserDefined = 4999 |
73 }; | 73 }; |
74 | 74 |
75 virtual bool connect(const KURL&, const String& protocol) = 0; | 75 virtual bool connect(const KURL&, const String& protocol) = 0; |
76 virtual void send(const String& message) = 0; | 76 virtual void send(const String& message) = 0; |
77 virtual void send(const ArrayBuffer&, unsigned byteOffset, unsigned byteLeng
th) = 0; | 77 virtual void send(const ArrayBuffer&, unsigned byteOffset, unsigned byteLeng
th) = 0; |
78 virtual void send(PassRefPtr<BlobDataHandle>) = 0; | 78 virtual void send(PassRefPtr<BlobDataHandle>) = 0; |
79 | 79 |
80 // For WorkerThreadableWebSocketChannel. | 80 // For WorkerWebSocketChannel. |
81 virtual void send(PassOwnPtr<Vector<char> >) = 0; | 81 virtual void send(PassOwnPtr<Vector<char> >) = 0; |
82 | 82 |
83 // Do not call |send| after calling this method. | 83 // Do not call |send| after calling this method. |
84 virtual void close(int code, const String& reason) = 0; | 84 virtual void close(int code, const String& reason) = 0; |
85 | 85 |
86 // Log the reason text and close the connection. Will call didClose(). | 86 // Log the reason text and close the connection. Will call didClose(). |
87 // The MessageLevel parameter will be used for the level of the message | 87 // The MessageLevel parameter will be used for the level of the message |
88 // shown at the devtool console. | 88 // shown at the devtool console. |
89 // sourceURL and lineNumber parameters may be shown with the reason text | 89 // sourceURL and lineNumber parameters may be shown with the reason text |
90 // at the devtool console. | 90 // at the devtool console. |
(...skipping 12 matching lines...) Expand all Loading... |
103 virtual void resume() = 0; | 103 virtual void resume() = 0; |
104 | 104 |
105 virtual ~WebSocketChannel() { } | 105 virtual ~WebSocketChannel() { } |
106 | 106 |
107 virtual void trace(Visitor*) { } | 107 virtual void trace(Visitor*) { } |
108 }; | 108 }; |
109 | 109 |
110 } // namespace blink | 110 } // namespace blink |
111 | 111 |
112 #endif // WebSocketChannel_h | 112 #endif // WebSocketChannel_h |
OLD | NEW |