Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は現在、UDPを介してパケットのノンブロッキング受信を行うことになっているAndroid用のクライアントアプリケーションを開発しています。receive()で非ブロッキングになるようにDatagramSocketを設定する方法はありますか?
基本的に私が求めているのは、DatagramSocketのMSG_DONTWAITフラグを設定する方法です。
あなたが探しているのはjava.nio.channels.DatagramChannel、友達です。
java.nio.channels.DatagramChannel