What is the difference between socket functions write() and send()?

This is a discussion on What is the difference between socket functions write() and send()? within the Linux Programming forums, part of the Platform Specific Boards category; Hello! Well,like the title says,I was wondering what is the difference between those functions.Don't they do the exact same thing,write ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    37

    What is the difference between socket functions write() and send()?

    Hello!

    Well,like the title says,I was wondering what is the difference between those functions.Don't they do the exact same thing,write data to socket?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    AFAIK, they're only equivalent when the last param of send() is zero.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 03-10-2008, 11:57 AM
  2. sending n no of char data uning send() function,
    By thebrighter in forum Windows Programming
    Replies: 1
    Last Post: 08-22-2007, 12:26 PM
  3. socket programming in linux
    By crazeinc in forum C Programming
    Replies: 1
    Last Post: 05-27-2005, 07:40 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 08:32 AM
  5. socket newbie, losing a few chars from server to client
    By registering in forum Linux Programming
    Replies: 2
    Last Post: 06-07-2003, 11:48 AM

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