sockets

This is a discussion on sockets within the Networking/Device Communication forums, part of the General Programming Boards category; i understand the basic sock functions and how to use them, like socket(), bind(), listen(), connect(), accept(), send(), & recv(). ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    137

    sockets

    i understand the basic sock functions and how to use them, like socket(), bind(), listen(), connect(), accept(), send(), & recv(). i'm having some trouble figuring out how to use sockets though. i'm not really understanding what the structs sockaddr_in and sockaddr do. i know that they store the address and the port, but i don't really know what else and for what.

    can anyone tell me what sockaddr_in and sockaddr are for, what they do, and what the difference between them is? thank you for your time.

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    As far as I know, storing that kind of data really is all they do. All the real work goes on behind the scenes at the operating system level. MSDN and Beej's could clarify more specifics for you.

    sockaddr_in is just a version of sockaddr specialized for use on the internet.

    Moved to the Networking Board.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Beej Guide To Network Programming...
    www.ecst.csuchico.edu/~beej/guide/net/bgnet.pdf
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best way to poll sockets?
    By 39ster in forum Networking/Device Communication
    Replies: 3
    Last Post: 07-22-2008, 02:43 PM
  2. Cross platform sockets
    By zacs7 in forum Networking/Device Communication
    Replies: 5
    Last Post: 06-27-2007, 06:16 AM
  3. multiple UDP sockets with select()
    By nkhambal in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-17-2006, 07:36 PM
  4. Raw Sockets and SP2...
    By Devil Panther in forum Networking/Device Communication
    Replies: 11
    Last Post: 08-12-2005, 05:52 AM
  5. Starting window sockets
    By _Cl0wn_ in forum Windows Programming
    Replies: 2
    Last Post: 01-20-2003, 11:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21