diff options
Diffstat (limited to '')
-rw-r--r-- | src/tcpsocket.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/tcpsocket.cpp b/src/tcpsocket.cpp index 399ec44..b9b215c 100644 --- a/src/tcpsocket.cpp +++ b/src/tcpsocket.cpp | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | namespace Bu { subExceptionDef( TcpSocketException ) } | 32 | namespace Bu { subExceptionDef( TcpSocketException ) } |
33 | 33 | ||
34 | Bu::TcpSocket::TcpSocket( int nTcpSocket ) : | 34 | Bu::TcpSocket::TcpSocket( handle nTcpSocket ) : |
35 | nTcpSocket( nTcpSocket ), | 35 | nTcpSocket( nTcpSocket ), |
36 | bActive( true ), | 36 | bActive( true ), |
37 | bBlocking( true ) | 37 | bBlocking( true ) |
@@ -443,11 +443,24 @@ Bu::String Bu::TcpSocket::getAddress() const | |||
443 | return sAddress; | 443 | return sAddress; |
444 | } | 444 | } |
445 | 445 | ||
446 | Bu::TcpSocket::operator int() const | 446 | Bu::TcpSocket::operator Bu::TcpSocket::handle() const |
447 | { | 447 | { |
448 | return nTcpSocket; | 448 | return nTcpSocket; |
449 | } | 449 | } |
450 | 450 | ||
451 | Bu::TcpSocket::handle Bu::TcpSocket::getHandle() const | ||
452 | { | ||
453 | return nTcpSocket; | ||
454 | } | ||
455 | |||
456 | Bu::TcpSocket::handle Bu::TcpSocket::takeHandle() | ||
457 | { | ||
458 | handle nRet = nTcpSocket; | ||
459 | bActive = false; | ||
460 | nTcpSocket = 0; | ||
461 | return nRet; | ||
462 | } | ||
463 | |||
451 | Bu::size Bu::TcpSocket::getSize() const | 464 | Bu::size Bu::TcpSocket::getSize() const |
452 | { | 465 | { |
453 | throw UnsupportedException(); | 466 | throw UnsupportedException(); |