Results 1 to 3 of 3

Thread: C++ sockets

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Posts
    1

    C++ sockets

    Hi. I'm learning C++ (i'm using kdevelop and i'm making "console" programs to begin with). I was searching a good tutorial on how to use socket with C/C++. I found a couple of pre-made libraries but I don't want "pre-made" things, I want to understand how they works.
    Thanks

  2. #2
    Senior Member
    Join Date
    Nov 2003
    Location
    Washington State
    Posts
    120
    Heres some links:
    http://www.chris-lott.org/resources/cstyle/
    http://ibrado.com/sock-faq/
    http://www.comptechdoc.org/independe...working/guide/
    I dont have time to look through them, but maybe you can find something usefull.

  3. #3
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    A similar post in the python NG turned out this tutorial.

    The BSD sockets API is exposed in perl/python/ruby. If you're familiar with any of these, a few throw-away experimental scripts might help you gain a quick understanding of the API.

    The C-level API requires a lot of casting if I recall correctly. The thing that really (once) helped me understand it all is that the BSD library was designed as a multi-protocol one, not just tcpip. So the structure which represents a generic network address is slightly expanded to accomodate the notion of a tcp address, and when passing pointers to these, one needs to explicitly cast in C. In C++ proper objects can represent those notions and offer a cleaner interface. You can implement such a wrapper yourself once you've understood the underlying C-level API.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DEC VAX 4000-500 - Vintage - excellent condition - UPS shipping picture

DEC VAX 4000-500 - Vintage - excellent condition - UPS shipping

$3999.00



Vintage DEC Digital Equipment Corp HP Compaq Drive Pullers, Bay Slot Covers picture

Vintage DEC Digital Equipment Corp HP Compaq Drive Pullers, Bay Slot Covers

$100.00



Vintage DEC Digital Starion 200 Desktop PC Powers On Boots To BIOS NO HDD - DW picture

Vintage DEC Digital Starion 200 Desktop PC Powers On Boots To BIOS NO HDD - DW

$269.99



Vintage DEC/Mostek memory systems MK 8015 AA-00 6805-08015 1100 REV C(B7) picture

Vintage DEC/Mostek memory systems MK 8015 AA-00 6805-08015 1100 REV C(B7)

$279.99



Vintage DEC RT-11 V5.0 8” Floppy Disks HT-11 System BASIC FORTRAN Software Lot picture

Vintage DEC RT-11 V5.0 8” Floppy Disks HT-11 System BASIC FORTRAN Software Lot

$199.95



6 Vintage DEC Digital System Building Blocks - Flip Chips  picture

6 Vintage DEC Digital System Building Blocks - Flip Chips

$75.00



DEC T2053-DE MS65A-DA 128MB VAX 6000 Memory Board Gold Scrap Vintage picture

DEC T2053-DE MS65A-DA 128MB VAX 6000 Memory Board Gold Scrap Vintage

$64.99



VINTAGE DEC LA34/ LA100 SERIES KEYBOARD W/NUMERIC PAD 70-17864-01C picture

VINTAGE DEC LA34/ LA100 SERIES KEYBOARD W/NUMERIC PAD 70-17864-01C

$140.00



Lot of 2 Compaq Alpha 21264C B21264C-1225TPN Vintage DEC Alpha CPU 2001 picture

Lot of 2 Compaq Alpha 21264C B21264C-1225TPN Vintage DEC Alpha CPU 2001

$49.99



Vintage DEC Digital M8153 RH70 UNIBUS CONTROL-BCT (B15) picture

Vintage DEC Digital M8153 RH70 UNIBUS CONTROL-BCT (B15)

$139.99