X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketPolicy.test.hh;h=8dd46d1086582a8eae1c8704889ecb27ac4f291b;hb=3863d46dd898b7bc35ea8c6ccd8563b18762a6b6;hp=418707b4884d0056c5c8f567e3e1bc4ff90f3380;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Socket/SocketPolicy.test.hh b/Socket/SocketPolicy.test.hh index 418707b..8dd46d1 100644 --- a/Socket/SocketPolicy.test.hh +++ b/Socket/SocketPolicy.test.hh @@ -1,9 +1,9 @@ // $Id$ // -// Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// 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 @@ -20,8 +20,8 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef HH_SocketPolicy_test_ -#define HH_SocketPolicy_test_ 1 +#ifndef HH_SENF_Socket_SocketPolicy_test_ +#define HH_SENF_Socket_SocketPolicy_test_ 1 // Custom includes #include "SocketPolicy.hh" @@ -31,13 +31,12 @@ ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - namespace test { struct SomeAddressingPolicy : public senf::AddressingPolicyBase { typedef unsigned Address; - + static void peer(FileHandle handle, unsigned & addr) { addr=1; } static void local(FileHandle, unsigned & addr) @@ -55,6 +54,8 @@ namespace test { { static int accept(FileHandle handle, unsigned & addr) { addr = 3; return -1; } + static int accept(FileHandle handle) + { return -1; } }; struct SomeReadPolicy : public senf::ReadPolicyBase @@ -91,27 +92,13 @@ namespace test { return write(handle,buffer,size); } }; - - struct SomeBufferingPolicy : public senf::BufferingPolicyBase - { - static unsigned rcvbuf(FileHandle handle) - { return 0; } - static unsigned rcvbuf(FileHandle handle, unsigned size) - { return 0; } - - static unsigned sndbuf(FileHandle handle) - { return 0; } - static unsigned sndbuf(FileHandle handle, unsigned size) - { return 0; } - }; typedef senf::MakeSocketPolicy< SomeAddressingPolicy, SomeFramingPolicy, SomeCommunicationPolicy, SomeReadPolicy, - SomeWritePolicy, - SomeBufferingPolicy + SomeWritePolicy >::policy SomeSocketPolicy; }} @@ -126,5 +113,10 @@ namespace test { // Local Variables: // mode: c++ +// fill-column: 100 // c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: