X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FINet%2FTCPSocketHandle.test.cc;h=4bb827b02cf5f94e9bfd5357d0f39a44ff78deee;hb=72cc548dfc3fa72d14d4d8c1a178f162165e933a;hp=889a139787a6a72cb43cdbcbb0e51633c9be518a;hpb=847b1f511f9a30c72496430bdc9be2e67b9f338b;p=senf.git diff --git a/senf/Socket/Protocols/INet/TCPSocketHandle.test.cc b/senf/Socket/Protocols/INet/TCPSocketHandle.test.cc index 889a139..4bb827b 100644 --- a/senf/Socket/Protocols/INet/TCPSocketHandle.test.cc +++ b/senf/Socket/Protocols/INet/TCPSocketHandle.test.cc @@ -2,23 +2,28 @@ // // Copyright (C) 2006 // Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY -// Stefan Bund // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. +// The contents of this file are subject to the Fraunhofer FOKUS Public License +// Version 1.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// http://senf.berlios.de/license.html // -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// The Fraunhofer FOKUS Public License Version 1.0 is based on, +// but modifies the Mozilla Public License Version 1.1. +// See the full license text for the amendments. // -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the -// Free Software Foundation, Inc., -// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the License. +// +// The Original Code is Fraunhofer FOKUS code. +// +// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. +// (registered association), Hansastraße 27 c, 80686 Munich, Germany. +// All Rights Reserved. +// +// Contributor(s): +// Stefan Bund /** \file \brief TCPSocketHandle unit tests */ @@ -41,9 +46,9 @@ #include #define prefix_ -///////////////////////////////cc.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace { @@ -69,7 +74,7 @@ namespace { int n = read(sock,buffer,1024); if (n == 4 && strncmp(buffer,"QUIT",4) == 0) break; - write(sock,buffer,n); + senf::IGNORE( write(sock,buffer,n) ); } if (shutdown(sock, SHUT_RDWR) < 0) fail("server_v4","shutdown()"); @@ -99,7 +104,7 @@ namespace { int n = read(sock,buffer,1024); if (n == 4 && strncmp(buffer,"QUIT",4) == 0) break; - write(sock,buffer,n); + senf::IGNORE( write(sock,buffer,n) ); } if (shutdown(sock, SHUT_RDWR) < 0) fail("server_v6","shutdown()"); @@ -109,12 +114,12 @@ namespace { } -BOOST_AUTO_UNIT_TEST(tcpv4ClientSocketHandle) +SENF_AUTO_UNIT_TEST(tcpv4ClientSocketHandle) { { senf::TCPv4ClientSocketHandle sock; - BOOST_CHECK_THROW( sock.connect(senf::INet4SocketAddress(localhost4str(0))), + BOOST_CHECK_THROW( sock.connect(senf::INet4SocketAddress(localhost4str(0))), senf::SystemException ); } @@ -180,12 +185,12 @@ BOOST_AUTO_UNIT_TEST(tcpv4ClientSocketHandle) } } -BOOST_AUTO_UNIT_TEST(tcpv6ClientSocketHandle) +SENF_AUTO_UNIT_TEST(tcpv6ClientSocketHandle) { { senf::TCPv6ClientSocketHandle sock; - BOOST_CHECK_THROW( sock.connect(senf::INet6SocketAddress(localhost6str(0))), + BOOST_CHECK_THROW( sock.connect(senf::INet6SocketAddress(localhost6str(0))), senf::SystemException ); } @@ -239,7 +244,7 @@ BOOST_AUTO_UNIT_TEST(tcpv6ClientSocketHandle) } } -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace { @@ -260,7 +265,7 @@ namespace { int n = read(sock,buffer,1024); if (n == 4 && strncmp(buffer,"QUIT",4) == 0) break; - write(sock,buffer,n); + senf::IGNORE( write(sock,buffer,n) ); } if (shutdown(sock, SHUT_RDWR) < 0) fail("client_v4","shutdown()"); @@ -284,7 +289,7 @@ namespace { int n = read(sock,buffer,1024); if (n == 4 && strncmp(buffer,"QUIT",4) == 0) break; - write(sock,buffer,n); + senf::IGNORE( write(sock,buffer,n) ); } if (shutdown(sock, SHUT_RDWR) < 0) fail("client_v6","shutdown()"); @@ -293,7 +298,7 @@ namespace { } -BOOST_AUTO_UNIT_TEST(tcpv4ServerSocketHandle) +SENF_AUTO_UNIT_TEST(tcpv4ServerSocketHandle) { try { alarm(10); @@ -319,7 +324,7 @@ BOOST_AUTO_UNIT_TEST(tcpv4ServerSocketHandle) } } -BOOST_AUTO_UNIT_TEST(tcpv6ServerSocketHandle) +SENF_AUTO_UNIT_TEST(tcpv6ServerSocketHandle) { try { alarm(10); @@ -345,7 +350,7 @@ BOOST_AUTO_UNIT_TEST(tcpv6ServerSocketHandle) } } -///////////////////////////////cc.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_