Bootstrap

微信 html5中实现udp,h5前端UDP发送经验分享,测试可用

mui.plusReady(function(){

testThread()

})

function testThread() {

var App = plus.android.runtimeMainActivity();

var Thread = plus.ios.importClass('java.lang.Thread');

var SocketChannel = plus.android.importClass('java.nio.channels.SocketChannel');

var Selector = plus.android.importClass('java.nio.channels.Selector');

var SelectionKey = plus.android.importClass('java.nio.channels.SelectionKey');

var InetSocketAddress = plus.android.importClass('java.net.InetSocketAddress');

var SocketAddress = plus.android.importClass('java.net.SocketAddress');

var ByteBuffer = plus.android.importClass('java.nio.ByteBuffer');

var Iterator = plus.android.importClass('java.util.Iterator');

var method = plus.android.importClass('java.l

;