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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 SocketAddress AsyncUDPSocket::GetLocalAddress() const { | 52 SocketAddress AsyncUDPSocket::GetLocalAddress() const { |
53 return socket_->GetLocalAddress(); | 53 return socket_->GetLocalAddress(); |
54 } | 54 } |
55 | 55 |
56 SocketAddress AsyncUDPSocket::GetRemoteAddress() const { | 56 SocketAddress AsyncUDPSocket::GetRemoteAddress() const { |
57 return socket_->GetRemoteAddress(); | 57 return socket_->GetRemoteAddress(); |
58 } | 58 } |
59 | 59 |
60 int AsyncUDPSocket::Send(const void *pv, size_t cb, | 60 int AsyncUDPSocket::Send(const void *pv, size_t cb, |
61 const rtc::PacketOptions& options) { | 61 const rtc::PacketOptions& options) { |
62 rtc::SentPacket sent_packet(options.packet_id, rtc::Time()); | 62 rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis()); |
63 int ret = socket_->Send(pv, cb); | 63 int ret = socket_->Send(pv, cb); |
64 SignalSentPacket(this, sent_packet); | 64 SignalSentPacket(this, sent_packet); |
65 return ret; | 65 return ret; |
66 } | 66 } |
67 | 67 |
68 int AsyncUDPSocket::SendTo(const void *pv, size_t cb, | 68 int AsyncUDPSocket::SendTo(const void *pv, size_t cb, |
69 const SocketAddress& addr, | 69 const SocketAddress& addr, |
70 const rtc::PacketOptions& options) { | 70 const rtc::PacketOptions& options) { |
71 rtc::SentPacket sent_packet(options.packet_id, rtc::Time()); | 71 rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis()); |
72 int ret = socket_->SendTo(pv, cb, addr); | 72 int ret = socket_->SendTo(pv, cb, addr); |
73 SignalSentPacket(this, sent_packet); | 73 SignalSentPacket(this, sent_packet); |
74 return ret; | 74 return ret; |
75 } | 75 } |
76 | 76 |
77 int AsyncUDPSocket::Close() { | 77 int AsyncUDPSocket::Close() { |
78 return socket_->Close(); | 78 return socket_->Close(); |
79 } | 79 } |
80 | 80 |
81 AsyncUDPSocket::State AsyncUDPSocket::GetState() const { | 81 AsyncUDPSocket::State AsyncUDPSocket::GetState() const { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // If we did not, then we should resize our buffer to be large enough. | 118 // If we did not, then we should resize our buffer to be large enough. |
119 SignalReadPacket(this, buf_, static_cast<size_t>(len), remote_addr, | 119 SignalReadPacket(this, buf_, static_cast<size_t>(len), remote_addr, |
120 CreatePacketTime(0)); | 120 CreatePacketTime(0)); |
121 } | 121 } |
122 | 122 |
123 void AsyncUDPSocket::OnWriteEvent(AsyncSocket* socket) { | 123 void AsyncUDPSocket::OnWriteEvent(AsyncSocket* socket) { |
124 SignalReadyToSend(this); | 124 SignalReadyToSend(this); |
125 } | 125 } |
126 | 126 |
127 } // namespace rtc | 127 } // namespace rtc |
OLD | NEW |