1.0.8 • Published 6 years ago

cordova-plugin-zuozishu-threadtcp v1.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

cordova-plugin-zuozishu-threadtcp

cordova plugin tcp socket thread, just for android now, ios wait for later

  • develop eviroment in android@6.4.0

API

  • ThreadTcp.onConnected = function(){} //it will be trigger when the connect success
  • ThreadTcp.onClose = function(){} //it will be trigger when the connect closed
  • ThreadTcp.onError = function(){} //it will be trigger when the connect error
  • ThreadTcp.onWarning = function(){} //it will be trigger when the connect get wrong message data
  • ThreadTcp.onMessage = function(data){}; //when get remote message data, it will be trigger
  • ThreadTcp.reconnecttime = 3000; //auto reconnect time,set it before connect,default false/0, if set it, when get Error/Close Event will be auto reconnect
  • ThreadTcp.connect(config,successFunction,errorFunction); //connect to remote, config = 'address string default 127.0.0.1',port int default 8989,timeout int default 5000,pingTime int default 3000,pingText string default 'ping'
  • ThreadTcp.sendMessage(data,successFunction,errorFunction); //send message to remote
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago