是否可以使用 libcurl 来管理原始 TCP 连接?
Is it possible to use libcurl to manage raw TCP connections?
Libcurl 在管理 http 连接方面做得很好。可以用它来管理原始 TCP 连接吗?
根据其official page,libcurl支持:
DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, HTTP proxy tunneling and more.
所以,简短的回答是"NO"它不支持原始 TCP 连接。
有可能...但相当复杂:https://curl.haxx.se/libcurl/c/sendrecv.html
Libcurl 在管理 http 连接方面做得很好。可以用它来管理原始 TCP 连接吗?
根据其official page,libcurl支持:
DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, HTTP proxy tunneling and more.
所以,简短的回答是"NO"它不支持原始 TCP 连接。
有可能...但相当复杂:https://curl.haxx.se/libcurl/c/sendrecv.html