I tried to start a simple tcp-server:
chrome.sockets.tcpServer.create({}, function(info){
chrome.sockets.tcpServer.listen(info.socketId, 'localhost', 2000, function(result){
console.log(result);
});
});
But somehow console.log(result);
always prints out undefined
!
http://developer.chrome.com/apps/sockets_tcpServer#method-create
http://developer.chrome.com/apps/sockets_tcpServer#method-listen
What do i wrong? Thanks!
You have to add the following permission to your manifest :
"sockets": {
"tcpServer" : {
"listen": ["host-pattern1", ...],
...
}
}
https://developer.chrome.com/apps/app_network
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With