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 it console.log(result);always displays undefined!
console.log(result);
undefined
http://developer.chrome.com/apps/sockets_tcpServer#method-create
http://developer.chrome.com/apps/sockets_tcpServer#method-listen
What am I wrong? Thank!
For your manifest, you must add the following permission:
"sockets": { "tcpServer" : { "listen": ["host-pattern1", ...], ... } }
https://developer.chrome.com/apps/app_network
Source: https://habr.com/ru/post/1531034/More articles:Managing REST Services - restgdb: "Левый операнд присваивания не является значением lvalue". - cHow can I use typeahead.js with bootstrap 3? - twitter-bootstrap-3Спящий режим 4.3.4 Критерий использованияОбновление - javaэлемент бритвы <элемент MyObject> не был закрыт - c#Text summation data set - textImplementing the MDM Server SyncML Protocol - windows-phone-8Do not show cellular alert on iOS - iosMy RSA algorithm only works for very short words - algorithmСтрока формата NSRunAlertPanel + не является строковым литералом (потенциально небезопасным) - objective-cAll Articles