aboutsummaryrefslogtreecommitdiff
path: root/src/udpsocket.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-03-18 23:02:54 +0000
committerMike Buland <eichlan@xagasoft.com>2011-03-18 23:02:54 +0000
commitcba6293cf22e2c2ae17dd3954ad7d097f379c7ac (patch)
treedcdbda1f54d3d39a0066f2f42c7e1714e1ceb834 /src/udpsocket.cpp
parentfcf2dde54316a3ac35936157babccae8c8d8d90b (diff)
downloadlibbu++-cba6293cf22e2c2ae17dd3954ad7d097f379c7ac.tar.gz
libbu++-cba6293cf22e2c2ae17dd3954ad7d097f379c7ac.tar.bz2
libbu++-cba6293cf22e2c2ae17dd3954ad7d097f379c7ac.tar.xz
libbu++-cba6293cf22e2c2ae17dd3954ad7d097f379c7ac.zip
Wow, a lot has changed. String is not a template class, and it can do it's own
formatting ala QString.
Diffstat (limited to 'src/udpsocket.cpp')
-rw-r--r--src/udpsocket.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/udpsocket.cpp b/src/udpsocket.cpp
index b577302..055d584 100644
--- a/src/udpsocket.cpp
+++ b/src/udpsocket.cpp
@@ -83,15 +83,11 @@ Bu::UdpSocket::~UdpSocket()
83 83
84Bu::String Bu::UdpSocket::addrToStr( const addr &a ) 84Bu::String Bu::UdpSocket::addrToStr( const addr &a )
85{ 85{
86 Bu::String sOut; 86 return Bu::String("%1.%2.%3.%4").
87 sOut.format("%d.%d.%d.%d", 87 arg( (a&0xff) ).
88 (a&0xff), 88 arg( (a&0xff00)>>8 ).
89 (a&0xff00)>>8, 89 arg( (a&0xff0000)>>16 ).
90 (a&0xff0000)>>16, 90 arg( (a&0xff000000)>>24 );
91 (a&0xff000000)>>24
92 );
93
94 return sOut;
95} 91}
96 92
97void Bu::UdpSocket::close() 93void Bu::UdpSocket::close()