FrontPage > C/C++ > send

send

説明

[TCP]パケットを送信します。

インクルード

#include <sys/types.h>

#include <sys/socket.h>

書式

ssize_t send (int s, const void *buf, size_t len, int flags);

第1引数 : ソケット・ファイル・ディスクリプタ(s)
第2引数 : 送信データ
第3引数 : 送信データ数
第3引数 : フラグ

戻り値  : 送信完了データ数、エラー[-1]

※「send (s, buf, len, flags);」と「sendto (s, buf, len, flags, NULL, 0);」は等価
※「send (s, buf, len, 0);」と「write (s, buf, len);」は等価

サンプル

関連項目


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2009-01-04 (日) 10:34:04