简体   繁体   中英

Sending Data to particular IP in windows OS using ANSI C

I want to send data or packets at particular IP address using ANSI C standard so that my code will be platform independent. How is it possible in windows OS without using windows libraries like winsock etc.? Kindly give me some guidelines or hints.

i don't think it's possible to create platform independent socket code because though ANSI C is a standard, well-defined language and network communications are invariably a feature provided by the operating system and will vary from OS to OS. This means that your code will have differences between platforms. The best you could do is mitigate these differences by constructing a clever API/library to limiting the code you need to re/write when porting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM