flush
説明
例
リモート ホストの入力と出力をフラッシュ
IP アドレス 172.28.154.231
とポート 4012
を使用する、t
という TCP/IP クライアントを作成します。
t = tcpclient("172.28.154.231",4012)
t = tcpclient with properties: Address: '172.28.154.231' Port: 4012 NumBytesAvailable: 0 Show all properties, functions
リモート ホストにデータを書き込み、入力バッファーに読み取ることができるバイト数を確認します。
write(t,1:5,"uint8")
t.NumBytesAvailable
ans = 5
入力および出力両方のバッファーをフラッシュします。
flush(t)
読み取り可能なバイト数を表示します。
t.NumBytesAvailable
ans = 0
入力バッファーにはデータがありません。
入力引数
バージョン履歴
R2020b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)