Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: net/socket/web_socket_server_socket.h

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_WEB_SOCKET_SERVER_SOCKET_H_ 5 #ifndef NET_SOCKET_WEB_SOCKET_SERVER_SOCKET_H_
6 #define NET_SOCKET_WEB_SOCKET_SERVER_SOCKET_H_ 6 #define NET_SOCKET_WEB_SOCKET_SERVER_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "net/base/net_api.h" 11 #include "net/base/net_export.h"
12 #include "net/socket/socket.h" 12 #include "net/socket/socket.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 // WebSocketServerSocket takes an (already connected) underlying transport 16 // WebSocketServerSocket takes an (already connected) underlying transport
17 // socket and speaks server-side websocket protocol atop of it. 17 // socket and speaks server-side websocket protocol atop of it.
18 // This class implements Socket interface: notice that Read() returns (or calls 18 // This class implements Socket interface: notice that Read() returns (or calls
19 // back) as soon as some amount of data is available, even if message/frame is 19 // back) as soon as some amount of data is available, even if message/frame is
20 // incomplete. 20 // incomplete.
21 class WebSocketServerSocket : public Socket { 21 class WebSocketServerSocket : public Socket {
(...skipping 26 matching lines...) Expand all
48 // must have already been connected/accepted. 48 // must have already been connected/accepted.
49 // 49 //
50 // Returns either ERR_IO_PENDING, in which case the given callback will be 50 // Returns either ERR_IO_PENDING, in which case the given callback will be
51 // called in the future with the real result, or it completes synchronously, 51 // called in the future with the real result, or it completes synchronously,
52 // returning the result immediately. 52 // returning the result immediately.
53 virtual int Accept(CompletionCallback* callback) = 0; 53 virtual int Accept(CompletionCallback* callback) = 0;
54 }; 54 };
55 55
56 // Creates websocket server socket atop of already connected socket. This 56 // Creates websocket server socket atop of already connected socket. This
57 // created server socket will take ownership of |transport_socket|. 57 // created server socket will take ownership of |transport_socket|.
58 NET_API WebSocketServerSocket* CreateWebSocketServerSocket( 58 NET_EXPORT WebSocketServerSocket* CreateWebSocketServerSocket(
59 Socket* transport_socket, WebSocketServerSocket::Delegate* delegate); 59 Socket* transport_socket,
60 WebSocketServerSocket::Delegate* delegate);
60 61
61 } // namespace net 62 } // namespace net
62 63
63 #endif // NET_SOCKET_WEB_SOCKET_SERVER_SOCKET_H_ 64 #endif // NET_SOCKET_WEB_SOCKET_SERVER_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698