Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_ | |
| 6 #define PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_ | |
| 7 | |
| 8 #include "ppapi/c/pp_stdint.h" | |
| 9 #include "ppapi/c/private/ppb_tcp_socket_private.h" | |
| 10 #include "ppapi/cpp/resource.h" | |
| 11 | |
| 12 namespace pp { | |
| 13 | |
| 14 class CompletionCallback; | |
| 15 class Instance; | |
| 16 | |
| 17 class TCPSocket : public Resource { | |
|
yzshen1
2011/11/11 21:04:28
It should have "Private" in the name.
(So that it
Dmitry Polukhin
2011/11/14 13:03:02
Done.
| |
| 18 public: | |
| 19 explicit TCPSocket(Instance* instance); | |
| 20 | |
| 21 int32_t Connect(const char* host, | |
| 22 uint16_t port, | |
| 23 const CompletionCallback& callback); | |
| 24 int32_t ConnectWithNetAddress(const PP_NetAddress_Private* addr, | |
| 25 const CompletionCallback& callback); | |
| 26 bool GetLocalAddress(PP_NetAddress_Private* local_addr); | |
| 27 bool GetRemoteAddress(PP_NetAddress_Private* remote_addr); | |
| 28 int32_t SSLHandshake(const char* server_name, | |
| 29 uint16_t server_port, | |
| 30 const CompletionCallback& callback); | |
| 31 int32_t Read(char* buffer, | |
| 32 int32_t bytes_to_read, | |
| 33 const CompletionCallback& callback); | |
| 34 int32_t Write(const char* buffer, | |
| 35 int32_t bytes_to_write, | |
| 36 const CompletionCallback& callback); | |
| 37 void Disconnect(); | |
| 38 }; | |
| 39 | |
| 40 } // namespace pp | |
| 41 | |
| 42 #endif // PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_ | |
| OLD | NEW |