sockets and ports??
Results 1 to 8 of 8

Thread: sockets and ports??

  1. #1
    Member
    Join Date
    Jun 2002
    Posts
    41

    sockets and ports??

    i was reading an article and came across the term 'socket' but wasnt sure what it was exactly. i looked it up and found this definition:

    (1) In UNIX and some other operating systems, a software object that connects an application to a network protocol. In UNIX, for example, a program can send and receive TCP/IP messages by opening a socket and reading and writing data to and from the socket. This simplifies program development because the programmer need only worry about manipulating the socket and can rely on the operating system to actually transport messages across the network correctly. Note that a socket in this sense is completely soft - it's a software object, not a physical component.


    a sockets a software ofject that can transmit data from applications. well isnt that what is port is as well?

    PORT(2) In TCP/IP and UDP networks, an endpoint to a logical connection. The port number identifies what type of port it is.


    thats what im confused about, and is the term socket relevant only to unix based systems as unix is mentioned twice in the definition. if anyone can clear that up for me that would be great. thanks in advance.
    know how to sell your wares. intrinsic quality isnt enough. not everyone bites at substance or looks for inner value. people like to follow the crowd;they go someplace because they see other people do so. uniqueness appeals both to the taste and to the intellect.

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    394
    it applys to everything that uses the ISO's OSI reference model.
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

  3. #3
    Senior Member
    Join Date
    Aug 2002
    Posts
    651
    Ok, no it's not just for Unix. A socket (as far as I can remember with Windows) is the IP address plus the port number. So therefore, a node's IP address is specified to get to it, but the port determines what application will be communicated with. For example, if you wanted to communicate via a browser to the remote control software on a machine, if it was Win VNC, you could open up a browser and type in something like http://192.168.15.32:5810 , and there you have a socket. I hope this helps a bit.
    Opinions are like holes - everybody\'s got\'em.

    Smile

  4. #4
    Member
    Join Date
    Jun 2002
    Posts
    41
    A socket (as far as I can remember with Windows) is the IP address plus the port number.
    i think this kind of clears it up a little more for me. so basically

    SOCKET=(IP ADDRESS)+(PORT #)

    is what you are saying. if so then i understand it much better. thank you.

    p.s. its great that you can find a couple thousand people to 'clear things up for you' in times of doubt, and usually in a matter of minutes. thanks again
    know how to sell your wares. intrinsic quality isnt enough. not everyone bites at substance or looks for inner value. people like to follow the crowd;they go someplace because they see other people do so. uniqueness appeals both to the taste and to the intellect.

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Posts
    225
    An even further way to understand it is this: Not only is a socket an IP addrews and a port #, it's a specific instance of an IP address + port #. Your OS's tcp/ip stack keeps these all organized and know which instance of which application, or which thread of which application is using which socket. Is this helpful, or have I just added more confusion??
    \"Now it\'s time to erase the story of our bogus fate. Our history as it\'s portrayed is just a recipe for hate!\"
    -Bad Religion

  6. #6
    Senior Member
    Join Date
    Oct 2001
    Posts
    114
    Another way to think of it as... socket connects ur application to ur port .. so here lies the diffrence..and yeah its used on almost every OS
    Better Laugh At Your Own Problems..
    Coz...The World Laughs At Them

  7. #7
    and is the term socket relevant only to unix based systems as unix is mentioned twice in the definition
    sockets are available on Windows too, but in windows we have what is called the Winsock API which alows the programer to use sockets in Windows, http://www.sockets.com/

    Edit:

    A quote from http://w3.softlookup.com/activex/tax12.htm#E70E114

    Berkeley Software Distribution's UNIX was the first to incorporate socket style-routines. BSD UNIX was developed to be the universal interface to TCP/IP. Although it is still in wide use, it has fallen into a small niche as other network systems such as NetWare and Windows NT have taken a dominant position. The TCP/IP aspect of UNIX remains, though.
    Thats why the majority of the socket information available online talks mainly about *nix based operating systems.
    test

  8. #8
    Member
    Join Date
    Jun 2002
    Posts
    41
    good info and links aj.
    thanx
    know how to sell your wares. intrinsic quality isnt enough. not everyone bites at substance or looks for inner value. people like to follow the crowd;they go someplace because they see other people do so. uniqueness appeals both to the taste and to the intellect.

Posting Permissions

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