OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 STATE_CLOSED, | 71 STATE_CLOSED, |
72 STATE_BINDING, | 72 STATE_BINDING, |
73 STATE_BOUND, | 73 STATE_BOUND, |
74 STATE_CONNECTING, | 74 STATE_CONNECTING, |
75 STATE_CONNECTED | 75 STATE_CONNECTED |
76 }; | 76 }; |
77 | 77 |
78 AsyncPacketSocket(); | 78 AsyncPacketSocket(); |
79 ~AsyncPacketSocket() override; | 79 ~AsyncPacketSocket() override; |
80 | 80 |
81 // Returns current local address. Address may be set to NULL if the | 81 // Returns current local address. Address may be set to null if the |
82 // socket is not bound yet (GetState() returns STATE_BINDING). | 82 // socket is not bound yet (GetState() returns STATE_BINDING). |
83 virtual SocketAddress GetLocalAddress() const = 0; | 83 virtual SocketAddress GetLocalAddress() const = 0; |
84 | 84 |
85 // Returns remote address. Returns zeroes if this is not a client TCP socket. | 85 // Returns remote address. Returns zeroes if this is not a client TCP socket. |
86 virtual SocketAddress GetRemoteAddress() const = 0; | 86 virtual SocketAddress GetRemoteAddress() const = 0; |
87 | 87 |
88 // Send a packet. | 88 // Send a packet. |
89 virtual int Send(const void *pv, size_t cb, const PacketOptions& options) = 0; | 89 virtual int Send(const void *pv, size_t cb, const PacketOptions& options) = 0; |
90 virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr, | 90 virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr, |
91 const PacketOptions& options) = 0; | 91 const PacketOptions& options) = 0; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Used only for listening TCP sockets. | 134 // Used only for listening TCP sockets. |
135 sigslot::signal2<AsyncPacketSocket*, AsyncPacketSocket*> SignalNewConnection; | 135 sigslot::signal2<AsyncPacketSocket*, AsyncPacketSocket*> SignalNewConnection; |
136 | 136 |
137 private: | 137 private: |
138 RTC_DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket); | 138 RTC_DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace rtc | 141 } // namespace rtc |
142 | 142 |
143 #endif // WEBRTC_BASE_ASYNCPACKETSOCKET_H_ | 143 #endif // WEBRTC_BASE_ASYNCPACKETSOCKET_H_ |
OLD | NEW |