Previous Next Table of Contents 3. クライアントアプリケーションの作成 (TCP/SOCK_STREAM) 3.1 文字列をインターネットアドレスに変換するにはどうすれば良いのですか? もしホストのアドレスをコマンド行から読んでいるのであれば、それが aaa.bbb.ccc.ddd スタイルのアドレスであるか host.domain.com スタ イルのアドレスであるかを知ることはできないでしょう。私がこれに関 して行う方法は、まず aaa.bbb.ccc.ddd タイプのアドレスであるとし てそれを使おうとします。そして、それが失敗したら、名前の検索を行 います。以下に例を示します: /* アスキー文字列を in_addr 構造体に変換する。アドレスがみつから なかった場合には NULL が返される。 */ struct in_addr *atoaddr
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
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く