From 1473b84ceed2be98006bf0e9e7a0487dfa42f034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 6 Nov 2015 10:05:14 +0100 Subject: Imported Upstream version 1.0.0 --- .travis.yml | 32 ++++++++++++++++++++ README.md | 72 +++++++++----------------------------------- changelog | 3 ++ configure.ac | 2 +- test/tcpnsockstream_test.cpp | 14 ++++++--- 5 files changed, 61 insertions(+), 62 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..369fe61 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: cpp + +sudo: required +dist: trusty + +compiler: + - gcc + - clang + +before_install: + - echo $LANG + - echo $LC_ALL + - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update && sudo apt-get install -y libcppunit-dev; fi + - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install cppunit; fi + +before_script: + - if [ $TRAVIS_OS_NAME == linux ]; then libtoolize; fi + - if [ $TRAVIS_OS_NAME == osx ]; then glibtoolize; fi + - aclocal + - autoheader + - autoconf + - automake --add-missing + - ./configure + +script: + - make + - make check + +os: + - linux + - osx + diff --git a/README.md b/README.md index 86cb18e..8da3338 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ psocksxx ======== +[![Build Status](https://travis-ci.org/nukedzn/psocksxx.svg)](https://travis-ci.org/nukedzn/psocksxx) + A C++ wrapper for POSIX sockets -### Copyright and License +## Copyright and License -Copyright (C) 2013 Uditha Atukorala. +Copyright (C) 2015 Uditha Atukorala. This software library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -19,7 +21,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the for more details. -### The Concept +## The Concept This project was started to add to the features provided by the simple [socket-library](https://github.com/uditha-atukorala/socket-library) project, @@ -40,66 +42,31 @@ C++. To keep the code simple and clean this project will only support POSIX sockets. -### Downloads -You can download the source distributions from http://packages.geniusse.com/source/psocksxx/. - - -#### Debian/Ubuntu packages -First you should add the repository key to avoid warnings. - - $ wget -q -O - http://packages.geniusse.com/debian/packman.gpg.key | sudo apt-key add - +## Downloads -Then add the following to your `/etc/apt/sources.list`; +You can download source distributions from https://github.com/nukedzn/psocksxx/releases. - $ deb http://packages.geniusse.com/debian/ [release] main -where the `[release]` being wheezy, jessie, sid etc. +### Debian/Ubuntu packages -Finally update your package list and install psocksxx; +Please check availability for your distribution first ([Debian](https://packages.debian.org/search?searchon=names&keywords=psocksxx), [Ubuntu](http://packages.ubuntu.com/search?suite=wily§ion=all&arch=any&keywords=psocksxx&searchon=names)). $ sudo aptitude update $ sudo aptitude install libpsocksxx-dev -### Dependencies +## Dependencies * CppUnit >= 1.12.1 (for unit tests) * Doxygen (for doxygen documentation, of course) -### Bugs and Feature Requests - -Please report all bugs and feature requests in [bugzilla](http://bugs.geniusse.com/) under the -[psocksxx](http://bugs.geniusse.com/enter_bug.cgi?product=psocksxx) project. -Known issues can be found [here](http://bugs.geniusse.com/buglist.cgi?query_format=specific&order=relevance%20desc&bug_status=__open__&product=psocksxx&list_id=130). - - -### Version history - -__0.0.6__ - _03rd October 2014_ -* Removing obsolete doxygen tags (bug [#37](http://bugs.geniusse.com/show_bug.cgi?id=37)) +## Bugs and Feature Requests -__0.0.5__ - _29th June 2014_ -* Fixing inconsistent timeout behaviour on different systems +Please report all bugs and feature requests under [issues](https://github.com/nukedzn/psocksxx/issues). -__0.0.4__ - _10th November 2013_ -* bug fix - member functions should not be throwing exceptions if the - signature does not specify it. -__0.0.3__ - _31st October 2013_ -* Suppress SIGPIPE signals -* Code cleanup work - -__0.0.2__ - _29th September 2013_ -* Added timeout support for socket communications -* New base socket stream I/O class to reduce redundant code -* Added install targets for doxygen generated docs - -__0.0.1__ - _19th September 2013_ -* Initial release - - -### Compiling from source +## Compiling from source If you are using the github source then first you need to initialise autotools. @@ -110,19 +77,10 @@ autotools. $ autoconf $ automake --add-missing (you will need automake >= 1.13) -Or you can grab the latest snapshot tar from [CI artifacts](http://jenkins.geniusse.com/job/psocksxx/). - After that you can use the usual `./configure && make` -### Notes -#### Continuous Integration - -There is a continuous integration Jenkins job hosted [here](http://jenkins.geniusse.com/job/psocksxx/) -which contains the latest artifacts, unit test results and documentation etc. - - -#### Doxygen documentation +## API Documentation -The latest doxygen documentation can be found at http://jenkins.geniusse.com/job/psocksxx/doxygen/. +* [v1.0](https://nukedzn.github.io/psocksxx/docs/v1.0) diff --git a/changelog b/changelog index 2bd1ba9..f0b834d 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +1.0.0 - 04th November 2015 + * First stable release (no code changes since v0.0.6) + 0.0.6 - 03rd October 2014 * Removing obsolete doxygen tags (bug #37) diff --git a/configure.ac b/configure.ac index 3145893..addd5a0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) -AC_INIT([psocksxx], [0.0.6], [http://bugs.geniusse.com/]) +AC_INIT([psocksxx], [1.0.0], [https://github.com/nukedzn/psocksxx/issues]) AC_CONFIG_AUX_DIR([aux-build]) AC_CONFIG_MACRO_DIR([aux-build/m4]) AC_CONFIG_HEADERS([include/config.h]) diff --git a/test/tcpnsockstream_test.cpp b/test/tcpnsockstream_test.cpp index 028832f..1cad1e7 100644 --- a/test/tcpnsockstream_test.cpp +++ b/test/tcpnsockstream_test.cpp @@ -187,14 +187,20 @@ void tcpnsockstream_test::test_accept_addr() { void tcpnsockstream_test::test_bind_addr_fail() { // tcp socket stream - tcpnsockstream ss; + tcpnsockstream ss, ssf; // network address to bind to - nsockaddr naddr( NSOCK_NODE, NSOCK_BIND_SERVICE ); + nsockaddr naddr( NSOCK_NODE, NSOCK_BIND_SERVICE + 1 ); + + try { + ss.bind( &naddr, true ); + } catch ( sockexception &e ) { + CPPUNIT_FAIL( e.what() ); + return; + } // bind - this should fail with address already in use error - // because of test_accept_addr() - CPPUNIT_ASSERT_THROW( ss.bind( &naddr ), sockexception ); + CPPUNIT_ASSERT_THROW( ssf.bind( &naddr ), sockexception ); } -- cgit v1.2.3