1919#endif
2020
2121namespace NInterconnect {
22- TAddress::TAddress () {
22+ TAddress::TAddress () noexcept {
2323 memset (&Addr, 0 , sizeof (Addr));
2424 }
2525
26- TAddress::TAddress (NAddr::IRemoteAddr& addr) {
26+ TAddress::TAddress (NAddr::IRemoteAddr& addr) noexcept {
2727 socklen_t len = addr.Len ();
2828 Y_ABORT_UNLESS (len <= sizeof (Addr));
2929 memcpy (&Addr.Generic , addr.Addr (), len);
3030 }
3131
32- int TAddress::GetFamily () const {
32+ int TAddress::GetFamily () const noexcept {
3333 return Addr.Generic .sa_family ;
3434 }
3535
36- socklen_t TAddress::Size () const {
36+ socklen_t TAddress::Size () const noexcept {
3737 switch (Addr.Generic .sa_family ) {
3838 case AF_INET6:
3939 return sizeof (sockaddr_in6);
@@ -44,15 +44,15 @@ namespace NInterconnect {
4444 }
4545 }
4646
47- sockaddr* TAddress::SockAddr () {
47+ sockaddr* TAddress::SockAddr () noexcept {
4848 return &Addr.Generic ;
4949 }
5050
51- const sockaddr* TAddress::SockAddr () const {
51+ const sockaddr* TAddress::SockAddr () const noexcept {
5252 return &Addr.Generic ;
5353 }
5454
55- ui16 TAddress::GetPort () const {
55+ ui16 TAddress::GetPort () const noexcept {
5656 switch (Addr.Generic .sa_family ) {
5757 case AF_INET6:
5858 return ntohs (Addr.Ipv6 .sin6_port );
@@ -67,7 +67,7 @@ namespace NInterconnect {
6767 return GetAddress () + " :" + ::ToString (GetPort ());
6868 }
6969
70- TAddress::TAddress (const char * addr, ui16 port) {
70+ TAddress::TAddress (const char * addr, ui16 port) noexcept {
7171 memset (&Addr, 0 , sizeof (Addr));
7272 if (inet_pton (Addr.Ipv6 .sin6_family = AF_INET6, addr, &Addr.Ipv6 .sin6_addr ) > 0 ) {
7373 Addr.Ipv6 .sin6_port = htons (port);
@@ -76,17 +76,17 @@ namespace NInterconnect {
7676 }
7777 }
7878
79- TAddress::TAddress (const TString& addr, ui16 port)
79+ TAddress::TAddress (const TString& addr, ui16 port) noexcept
8080 : TAddress(addr.data(), port)
8181 {}
8282
83- TAddress::TAddress (in_addr addr, ui16 port) {
83+ TAddress::TAddress (in_addr addr, ui16 port) noexcept {
8484 Addr.Ipv4 .sin_family = AF_INET;
8585 Addr.Ipv4 .sin_port = htons (port);
8686 Addr.Ipv4 .sin_addr = addr;
8787 }
8888
89- TAddress::TAddress (in6_addr addr, ui16 port) {
89+ TAddress::TAddress (in6_addr addr, ui16 port) noexcept {
9090 Addr.Ipv6 .sin6_family = AF_INET6;
9191 Addr.Ipv6 .sin6_port = htons (port);
9292 Addr.Ipv6 .sin6_addr = addr;
0 commit comments