OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 { | 56 { |
57 static TypeId tid = TypeId("ns3::NscTcpSocketImpl") | 57 static TypeId tid = TypeId("ns3::NscTcpSocketImpl") |
58 .SetParent<TcpSocket> () | 58 .SetParent<TcpSocket> () |
59 .AddTraceSource ("CongestionWindow", | 59 .AddTraceSource ("CongestionWindow", |
60 "The TCP connection's congestion window", | 60 "The TCP connection's congestion window", |
61 MakeTraceSourceAccessor (&NscTcpSocketImpl::m_cWnd)) | 61 MakeTraceSourceAccessor (&NscTcpSocketImpl::m_cWnd)) |
62 ; | 62 ; |
63 return tid; | 63 return tid; |
64 } | 64 } |
65 | 65 |
66 NscTcpSocketImpl::NscTcpSocketImpl () | 66 NscTcpSocketImpl::NscTcpSocketImpl () |
67 : m_endPoint (0), | 67 : m_endPoint (0), |
68 m_node (0), | 68 m_node (0), |
69 m_tcp (0), | 69 m_tcp (0), |
70 m_localAddress (Ipv4Address::GetZero ()), | 70 m_localAddress (Ipv4Address::GetZero ()), |
71 m_localPort (0), | 71 m_localPort (0), |
72 m_peerAddress ("0.0.0.0", 0), | 72 m_peerAddress ("0.0.0.0", 0), |
73 m_errno (ERROR_NOTERROR), | 73 m_errno (ERROR_NOTERROR), |
74 m_shutdownSend (false), | 74 m_shutdownSend (false), |
75 m_shutdownRecv (false), | 75 m_shutdownRecv (false), |
76 m_connected (false), | 76 m_connected (false), |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 { | 782 { |
783 m_delAckMaxCount = count; | 783 m_delAckMaxCount = count; |
784 } | 784 } |
785 | 785 |
786 uint32_t | 786 uint32_t |
787 NscTcpSocketImpl::GetDelAckMaxCount (void) const | 787 NscTcpSocketImpl::GetDelAckMaxCount (void) const |
788 { | 788 { |
789 return m_delAckMaxCount; | 789 return m_delAckMaxCount; |
790 } | 790 } |
791 | 791 |
| 792 void· |
| 793 NscTcpSocketImpl::SetPersistTimeout (Time timeout) |
| 794 { |
| 795 m_persistTimeout = timeout; |
| 796 } |
| 797 |
| 798 Time |
| 799 NscTcpSocketImpl::GetPersistTimeout (void) const |
| 800 { |
| 801 return m_persistTimeout; |
| 802 } |
| 803 |
792 enum Socket::SocketErrno | 804 enum Socket::SocketErrno |
793 NscTcpSocketImpl::GetNativeNs3Errno(int error) const | 805 NscTcpSocketImpl::GetNativeNs3Errno(int error) const |
794 { | 806 { |
795 enum nsc_errno err; | 807 enum nsc_errno err; |
796 | 808 |
797 if (error >= 0) | 809 if (error >= 0) |
798 { | 810 { |
799 return ERROR_NOTERROR; | 811 return ERROR_NOTERROR; |
800 } | 812 } |
801 err = (enum nsc_errno) error; | 813 err = (enum nsc_errno) error; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 return true; | 846 return true; |
835 } | 847 } |
836 | 848 |
837 bool | 849 bool |
838 NscTcpSocketImpl::GetAllowBroadcast () const | 850 NscTcpSocketImpl::GetAllowBroadcast () const |
839 { | 851 { |
840 return false; | 852 return false; |
841 } | 853 } |
842 | 854 |
843 }//namespace ns3 | 855 }//namespace ns3 |
OLD | NEW |