タグ

unixとNetworkに関するy_uukiのブックマーク (3)

  • Blocking vs. non-blocking sockets

    Chapter 6. Handling many sockets at once using select() 6.5. Blocking vs. non-blocking sockets So far in this chapter, you've seen that select() can be used to detect when data is available to read from a socket. However, there are times when its useful to be able to call send(), recv(), connect(), accept(), etc without having to wait for the result. For example, let's say that you're writing a we

  • ファイル記述子をUnixドメインソケット経由で渡す - bkブログ

    ファイル記述子をUnixドメインソケット経由で渡す Unix 系の多くの OSには、ファイル記述子を別のプロセスに Unix ドメインソケット経由で渡す機能があります。一見、何のために使うのかよくわからない機能ですが、 glibc の nscd はこれをうまく使っています。 nscd (name service caching daemon) は glibc 内で行われる名前関連の問い合わせをキャッシュするサーバです。NIS や LDAP などを用いてネットワークベースでユーザ管理を行っている場合、 getpwuid() などの関数はユーザ名の取得にネットワークアクセスを必要としますが、 nscd を立ち上げておけば、二度目からの同じ問い合わせはキャッシュから得られます。 nscd を立ち上げている GNU/Linux システムでは、キャッシュファイルが /var/db/nscd 以下に作

  • sock_raw

    Practical IoT Hacking After two long years of hard work it's finally out! Our book on Practical IoT Hacking has been published by No Starch Press. You can learn about how it came to be at Practical IoT Hacking timeline and what writing a technical book like this taught me. You can also find The Definitive Guide to Attacking the Internet of Things on Amazon. -- ithilgore, 1 February 2021 2019 highl

  • 1