Regarding Sockets.send()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HTB
    New Member
    • Aug 2007
    • 13

    Regarding Sockets.send()

    Hi,

    The normal way is to send a byte a time. Can we send less than a byte
    using maybe SocketFlags.Par tial or something else !!?

    I think if we could do that, we would have more flexibility & controling.
  • TRScheel
    Recognized Expert Contributor
    • Apr 2007
    • 638

    #2
    You want to send a bit at a time?

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      You're never REALLY sending only a byte.
      There is a whole lot of overhead, fram encapsulating, headers and all that good stuff that follows withthe tcp/ip stack.

      What you could do, if you wanted, would be to build up your own communications standard where you would only look at X amount of bits from data that is sent.

      But that's abit overkill, I mean you send a good couple of dozen for each send already, regardles of how much data you supply. That would make a LOT of traffic.

      Comment

      • HTB
        New Member
        • Aug 2007
        • 13

        #4
        TRScheel,

        ONE OR TWO BITS.... . CAN I !!!!!!?

        Comment

        • HTB
          New Member
          • Aug 2007
          • 13

          #5
          Plater,

          What you could do, if you wanted, would be to build up your own communications standard where you would only look at X amount of bits from data that is sent.


          If I did that, I will send a number of bits for no thing and my first goal
          is to send exactly the needed data (i am dealing with bits).

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Originally posted by HTB
            If I did that, I will send a number of bits for no thing and my first goal
            is to send exactly the needed data (i am dealing with bits).
            Well then the short answer is "no, you cannot". Sending a whole Byte is not going to cost you anything in performance if you only want 6bits

            Very few protocols allow transmissions of only bits (I can't think of any).
            A custom serial bus maybe

            Comment

            Working...