Thread: A little lost in the forest of libraries.

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    6

    A little lost in the forest of libraries.

    So here is the thing, i have been trying to find a socket library i could use, but they are all either GPL or pay for it consumer licenses. Haven taken hours and hours of searching i have finally given up on finding a library i could use, so i decided to try and find something about making my own library, but failed in finding info about that aswell.

    So my question is, can someone point me in the right direction of making my own libraries, preferrably a socket library of some sort.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Edit: It seems like a pretty drastic measure to write your own library. I made two searches and came up with a few different libraries that MAY work under non-GPL circumstances.

    So, can you be more specific as to:
    1. What license is acceptable to you - what are you planning to do with the resulting code?
    2. What other properties the library should have.

    I searched for "socket library eclipse license", and I found quite a few. If I understand licenses correctly, eclipse license gives quite a bit of freedom in the "how you can use the source code", including that it can be licensed again under different terms as part of a product [I'm sure there are some restrictions, as in you have to include it as PART OF a product, not just put price sticker on it and sell it].

    There are also quite a few libraries available under "LGPL", which again allows you to apply your own license on a product that uses the licensed product as a library - this is the same rules as for example the GNU C Library uses - it would be pretty pointless for a company to use a Open Source C library that would render their product Open Source too - assuming of course the company is producing Closed Source product.

    --
    Mats
    Last edited by matsp; 05-26-2009 at 07:07 AM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    6
    Preferrably i would like no license at all, or a very unrestrictive license. The library will be used for an examn project, but if it should ever find it's way into a production or commercial environment i would like to do as i see fit.
    To my recollection, the ecplise license is some sort of watered down GPL license, not that it is a bad thing, but like all licenses i know of it has some sort of catch. Like the eclipse license, if my memory serves me right, dictates that you have to include the license agreement and disclaimer in the program and make it easily accesible for viewing.

    The library should just be able to do basic client/server connections with custom protocols, though i would like the property of being able to talk ssh and wmi.

    I know it sounds rather drastic, but i would just like to have a way to make a client/server environment, without having to worry about restrictions, requirements and copyright infringement.

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    But surely, to make your application a commercial product would most likely encompass some work. So changing from Socket Library with GPL to another Socket Library with a similar interface and a more agreeable license would probably be a valid thing to do at such a stage.

    However, I found this:
    C++ Sockets Library license agreement

    Which appears rather low on restrictions - the only restriction is that you can't just take the socket library itself - which is fair.

    Edit: On closer inspection, I suspect you need to PAY to use the alternative license that I linked above. However, I expect the fee to be relatively small, and you only need to take that step once you have decided to make a commercial package from your product.

    --
    Mats
    Last edited by matsp; 05-26-2009 at 08:02 AM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    6
    ACE and Boost both have copyrights, and they have nothing indicating that they are even licenseable.

    Unfortunately there is no indication of cost on that library, and having to signup to find out if i can even afford it is kind of annoying. One of my big problems is that i don't exactly wallow in cash, which is why i was hoping to find some sort of free library to use for my application, as one has to make money before one can spend it.

  7. #7
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78
    Poco (POCO C++ Libraries > Info > About) also has socket classes and it is under Boost license. Documentation and examples are quite good.

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by kbutcher5 View Post
    ACE and Boost both have copyrights, and they have nothing indicating that they are even licenseable.

    Unfortunately there is no indication of cost on that library, and having to signup to find out if i can even afford it is kind of annoying. One of my big problems is that i don't exactly wallow in cash, which is why i was hoping to find some sort of free library to use for my application, as one has to make money before one can spend it.
    Which is why I said you can start out using the library I suggested with the GPL license. Then switch to the commercial license (or switch to another library) later on. If you write your code carefully so that the socket functionality itself is fairly isolated, then you should be able to switch libraries quite easily (which may be a good idea anyways, since you may find a (non-license) problem with the library you have chosen, and need to switch for that reason).

    Also, if you do find that you need to write your own library, having used an existing library a bit will certainly help you get the basis of the library sorted without having to spend as much effort figuring out "what do I want the library to do".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    May 2009
    Posts
    6
    @karas
    Thanks I will have a look at it.

    @matsp
    Thanks a lot for all the info, I think I will do as you suggested and have some trial runs with some of those free libraries, to get a feel for it

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Sounds like a good plan to me. Also, looking at the libraries will give you a better feel for how much work it is to make your own socket library. You will also notice that some libraries probably provide a "thicker" layer of isolation from the nitty gritty details than others.

    Obviously, depending on what your application actually does, you may need more close access to the socket itself or "don't care" about such things.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Registered User
    Join Date
    May 2009
    Posts
    6
    @matsp
    Sounds good to me and thank you again

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by kbutcher5 View Post
    ACE and Boost both have copyrights, and they have nothing indicating that they are even licenseable.
    Nonsense. The second paragraph on the front page of the Boost homepage mentions the Boost license, which is a very liberal (BSD-like) license. Every single source file has a license statement in addition to the copyright statement; there's an automated tool making sure of this. Here's a typical example:
    // Copyright Beman Dawes 2005.
    // Use, modification, and distribution is subject to the Boost Software
    // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    // http://www.boost.org/LICENSE_1_0.txt)
    Also, the page footer of the homepage mentions that Boost is distributed under the BSL. So does the LICENSE_1_0.txt file in the Boost distribution. I can't try it out, but I'm absolutely sure the Boost Installer for Windows also mentions the license upon installation.



    As for ACE, let's see. Go to the ACE homepage, there's a link called ACE Copyright. This leads you to a page which starts out by noting copyright, but already in the second sentence mentions that ACE is open-source and you've got a perpetual license to use it in pretty much whatever way you see fit. There's a bit more detail later, including the usual no-liability clause.


    So you can use them. Really.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #13
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Can I also point out that even if the code is COMPLETELY free to use anywhere and in any way you feel like, it SHOULD have copyright to the original author (or an organization). Someone wrote it, that's who has the copyright. I'd be very suspicious on code that doesn't have copyright - does no one even care enough about the code that they are willing to put their name to it - well, then it can't be very good... And to be fair to everyone, you should give credit to anyone contributing to the project, even if the contributor is unaware of the fact. This may be as part of the "about" or in the documentation, you say "Using Socket Library X (c) Some Name, 200X". After all, if the socket library is helping make your product do the work it does, then it should be given fair recognition.

    This doesn't change with whether you are producing commercial or experimental code, or any other form of code.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  14. #14
    Registered User
    Join Date
    May 2009
    Posts
    6
    @CornedBee
    I guess my license and copyright reading abilities aren't too hot, but in my defence, they usually are almost pure gibberish.

    @matsp
    It's not that I don't want to creadit the author, and if i used it for my project, i most probably would credit any author of any code i use. The point is just that I would like the choice to be mine, as well as for security measures, as the program I am thinking of building would need to be very secure. This wouldn't be that easy, if everyone could read the socket code and find potential exploits.

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by kbutcher5
    as well as for security measures, as the program I am thinking of building would need to be very secure. This wouldn't be that easy, if everyone could read the socket code and find potential exploits.
    With a sufficiently technical user base, if everyone could read the code and find potential exploits, they would also be able to help you find and fix such security bugs, in which case you would have less to worry about an attacker being able to exploit non-existent bugs. If you do want to have security by obscurity, then you might want to get your code reviewed by security experts, or risk attackers being able to exploit the bugs in your code even without access to the source.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GCC: Compiling with both static and shared libraries
    By eatwithaspork in forum C Programming
    Replies: 4
    Last Post: 06-23-2008, 01:48 PM
  2. Replies: 7
    Last Post: 05-13-2008, 03:47 AM
  3. MinGW thread-safe runtime libraries
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 08-21-2006, 08:15 AM
  4. Help with linking to other c++ libraries via .net
    By pipercubusa in forum C++ Programming
    Replies: 0
    Last Post: 05-02-2005, 01:08 PM
  5. QT and external libraries
    By Quacker in forum Linux Programming
    Replies: 1
    Last Post: 04-08-2003, 07:02 AM