-
Notifications
You must be signed in to change notification settings - Fork 40
Description
In ios/android was able to send message on tcp through this code ,
window.tlantic.plugins.socket.connect(
function (connectionId) {
alert('worked! This is the connection ID: ', connectionId);
window.tlantic.plugins.socket.send(function () {},function () {alert('failed!');},'192.168.1.95:53372','This is the data i want to send!');
},
function () {
alert('failed!');
},
'192.168.1.95',
53372
)
document.addEventListener(window.tlantic.plugins.socket.receiveHookName, function (ev) {
console.log(ev.metadata.host); // host who sent the data
console.log(ev.metadata.port); // sender port
console.log(ev.metadata.id); // connection id
console.log (ev.metadata.data); // received data
});
but i couldn't get any response back from TCP socket .It will be really appreciate if you could provide a sample for receiving socket thanking you :)