The difference is that recv()
/send()
work only on socket descriptors and let you specify certain options for the actual operation. Those functions are slightly more specialized (for instance, you can set a flag to ignore SIGPIPE
, or to send out-of-band messages...).
Functions read()
/write()
are the universal file descriptor functions working on all descriptors.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…