My problem with fdopen and sockets........
Steven M. Bellovin
smb at ulysses.homer.nj.att.com
Mon Feb 20 01:42:40 AEST 1989
In article <9556 at cit-vax.Caltech.Edu>, wen-king at cit-vax.Caltech.Edu (King Su) writes:
} Secondly, you do not need two sockets, you just need two FILEs. You can
} apply fdopen on the same file twice. You don't need to dup it either.
} For example:
}
} in = fdopen(soc,"r");
} out = fdopen(soc,"w");
That is not correct for System V; you do indeed need to do the dup().
Please note that I'm speaking empirically... (i.e., it broke on me
the other way.)
More information about the Comp.unix.wizards
mailing list