Hello!
Here's a JavaScript sample that works and is very similar to your C# code:
Good luck!
Here's a JavaScript sample that works and is very similar to your C# code:
using (var engine = new V8ScriptEngine()) { engine.AddHostObject("host", new HostFunctions()); engine.AddHostType(typeof(UdpClient)); engine.AddHostType(typeof(IPEndPoint)); engine.AddHostType(typeof(IPAddress)); engine.AddHostType(typeof(Encoding)); engine.AddHostType(typeof(Console)); engine.Execute(@" _lst = new UdpClient(4567); var groupEp = host.newVar(new IPEndPoint(IPAddress.Any, 4567)); try { while (true) { var bytes = _lst.Receive(groupEp.ref); Console.WriteLine(Encoding.ASCII.GetString(bytes, 0, bytes.Length)); } } catch (ex) { Console.WriteLine(ex.hostException); } "); }