Thread: more of a port curiousity question

  1. #1
    Registered User
    Join Date
    Apr 2007

    more of a port curiousity question

    I have always wondered why automatically assigned ports in BSD sockets range from 1024 to 5000... can anyone tell me why is this?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    0 to 1023 are reserved.
    Your OS probably treats the range you observe as a pool of ports to use, so it picks the next free one in that range.

    This isn't a C question, moved.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Concurrent chat, Sockets
    By jakemott in forum Linux Programming
    Replies: 6
    Last Post: 11-29-2008, 05:41 PM
  2. Question on Accessing parallel port
    By Luciferek in forum C++ Programming
    Replies: 6
    Last Post: 06-16-2008, 05:36 PM
  3. multiplexing
    By kaijuu in forum C Programming
    Replies: 0
    Last Post: 03-29-2008, 06:47 AM
  4. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM