[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Socket with g++



"Ivan J. Varzinczak" wrote:
> 
> Hi folks:
> 
>    I was trying to compile a simple server program using
> socket in g++ and I got the following error message:
> 
>    type `sockaddr' is not a base type for type `sockaddr_in'
> 

see at "Beej's Guide to Network Programming"
this is a good introduction to sockets programming
it is located at  http://www.ecst.csuchico.edu/~beej/guide/net/

Im also writing a Socket class which will use libsigc++ for non-blocking
Sockets and integrate nice into gtk-- but don't expect something working
before the end of the month.
ACE seems a good library but I do not need the portability (especially to
Windoze) and I think its too complicated to use. I just want a library
where I can say:
  S = new Socket();
  S.connect("localhost",12345);
  iostream sb(S.sockbuf());
  sb << "Hallo. Give me a number";
  sb >> int i;
That is a Feature that ace is currently missing. A sockbuf class
derived vom streambuf that is enables the use of the standard
stream classes that makes it as easy to use sockets for in/output.

Bernhard

PS: I really do NOT want the portability to Windoze + Winsock.

-- 
          __             ___
         // )    ___--""    "-.
    \ |,"( /`--""              `.     Bernhard Rieder
     \/ o                        \
     (   _.-.              ,'"    ;   mail: e9325898@stud2.tuwien.ac.at
      |\"   /`. \  ,      /       |
      | \  ' .'`.; |      |       \.___________________________
        _-'.'    | |--..,,,\_    \________---------~~~~~"""""""
       '''"   _-'.'       ___"-   )
             '''"        '''---~""


Reply to: