简体   繁体   English

我应该研究哪个 function 在 C 中制作插座?

[英]Which function should I look into to make a socket in C?

What function should I look into to create a socket for my mini-ftp server in C in the stdlib, except recv , send and all system calls that make a socket non-blocking?我应该研究什么 function 为我的 mini-ftp 服务器在 stdlib 中的 C 创建一个套接字,除了recvsend和所有使套接字非阻塞的系统调用?

There are plenty of guides for this sort of thing, in particular see Beej's Guide to Network Programming for working with Linux.这类事情有很多指南,特别是有关使用 Linux的 Beej 网络编程指南 There are similar / equivelant APIs exposed in Windows and other operating systems. Windows 和其他操作系统中公开了类似/等效的 API。

Fundamentally though, if you're using Liunx, you'll be interested in:但从根本上说,如果您使用的是 Liunx,您会对以下内容感兴趣:

If you're interested in non-blocking I/O, then the " Blocking " section will help.如果您对非阻塞 I/O 感兴趣,那么“阻塞”部分会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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