network monitoring
+ Reply to Thread
Results 1 to 3 of 3

Thread: bsd socket question

  1. #1
    Join Date
    Jun 2001
    Posts
    398

    bsd socket question

    hi,

    I am new at socket programming(bsd).Need some help.

    man socket

    *. it says SOCK_SEQPACKET is a sequenced reliable 2 way connection based data transmission path for datagrams.

    there is also a SOCK_RDM that provides a reliable datagram layer that doesnt guaruntee ordering.

    However it says that SOCK_SEQPACKET is not supported by the AF_INET family.

    how do we do reliable UDP datagrams transmission and rearrange out of order packets for hosts communicating on the internet?

    2. the same man page says SOCK_STREAM may support an out of band transmisson mechanism. What does it mean?

    *. What are the socket(2),connect(2),read(2),send(2),recv(2). I mean what does the number in () indicate. It is not the number of arguments passed. What is it?

    Thanks.

    Data.

  2. #2
    mbravo Guest
    Hello DATA,

    For *) I can't say definitely, but from what I know, there's no way to make a reliable ordered UDP connection, since UDP is an inherently unreliable protocol (hence it's name) and all reliability, sequencing and reordering is usually to be done by the application.

    For 2), out-of-band data for SOCK_STREAM is a TCP feature; when your application needs to send something that is not related to the current stream of data, say, some kind of flag indicating urgent action to the other side, it can do so with this feature (it's also called TCP URGENT), on the same socket.

    And *) is the easiest - these numbers are man page sections. Often, there are several entries in the mandb on a word, so to pull a description of a function as opposed, say, to a command-line utility, you call "man 2 socket" instead of "man socket" to be sure what sectyion of man database your docs come from.

    Hope this helps somewhat

  3. #3
    Join Date
    Jun 2001
    Posts
    398
    hi mrbravo,

    thanks-i get it now.

    As for question *. I think there are advantages of using reliable UDP over TCP if such udp packets give less over head than tcp packets and when it is applaction specific. May be I will have to write my own APPLICATION as you said to handle it.

    Regards Data.


    Hi fever,back at uni Good old hols are over.
    Last edited by DATA; 09-16-2003 at 04:04 AM.

+ Reply to Thread

Similar Threads

  1. question
    By darknight in forum Viruses and Trojans
    Replies: 1
    Last Post: 12-26-2008, 07:07 AM
  2. I have * question...plz help
    By ruspetriot in forum General discussion
    Replies: 7
    Last Post: 02-15-2008, 04:45 PM
  3. question regarding ip
    By arturo8913 in forum Internet Privacy
    Replies: 3
    Last Post: 04-28-2007, 04:38 PM
  4. Question
    By Unregistered in forum Internet Privacy
    Replies: 2
    Last Post: 04-21-2004, 09:18 AM
  5. how can i find a proxy\socket for IRC?
    By Unregistered in forum Proxies and Firewalls
    Replies: 0
    Last Post: 12-12-2003, 04:43 PM

Posting Permissions

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