Open AviFix opened 9 years ago
Hi,
Thanks for your response.
i just added the above code to an basic angular project.
is there something else i should do?
Thank's Avi
@AviFix Are you able to get the NetSocket working??
Hi, I am facing the same issue , have placed the manifest.json in the folder where net-socket.js but still i am getting the same error " Netsocket" undefined
I'm afraid I haven't used this project or even Angular at all in a few years, so I probably won't be of much help. Keep in mind that the underlying socket APIs are not available outside of a packaged application context like a Chrome App (a platform now being discontinued), Firefox OS (a dead platform), or NodeJS via something like Electron. There's not much of a point in trying to support all three anymore, in my opinion.
Thanks and have used Nw.js it server the purpose at client side though
Hi
I always get the NetSocket as undefined
i tried with google chrome and with firefox.
var app = angular.module('app', ['ngRoute','stepheneisenhauer.netsockets']);
app.controller('mainController', ['$scope','tcpservice', function ($scope,tcpservice) { tcpservice.connect('192.168.50.51',502); }]);
app.factory('tcpservice', function(NetSocket) { var socket = new NetSocket({ protocol: "tcp", onCreate: function(data){ console.log('onCreate') }, onConnect: function(data){ console.log('onConnect') }, onReceive: function(data){ console.log('onReceive') }, onSend: function(data){ console.log('onSend') }, onError: function(data){ console.log('onError') }, onDisconnect: function(data){ console.log('onDisconnect') }, onClose: function(data){ console.log('onClose') } });
Thanks allot
Avi