Hi All, My problem is get solved... A silli mistake... I just did initializing in_addr struct with NULL('\0') by memset(&dst_addr, '\0', sizeof(dst_addr)); So the problem was allocation of heap and stack memory to program at time of (not)using file operation. Iman, I'll look into your code and message you if I found any problem... But before anything please assure that you not making same mistake
-- Sumit