TreeviewCopyright © aleen42 all right reserved, powered by aleen42

IO Back

  • to control IO (input/output)
method
int ioctl(int fd, int req, ...)
parameters
  • fd: socket描述符
  • req: 執行的操作類型

    • SIOCATMARK: 參數int*, 是否帶有帶外標誌
    • FIOASYNC: 參數int*, 異步標誌
    • FIONREAD: 參數int*, 緩衝區可讀數據長度
    • FIONBIO: 參數int*, 設置socket狀態(阻塞/非阻塞)

      int on = 1;    //non-blocked mode
      ioctl(sockfd, FIONBIO, &on);
      
return value
  • 0: success
  • -1: failure
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.