Skip to content
Snippets Groups Projects
Commit 22fc57dd authored by rswindell's avatar rswindell
Browse files

Use (newly created) js.global property to detect if client object is defined.

parent 1635f23f
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,12 @@
load("sockdefs.js");
var global=js.global;
if(global==undefined)
global=this;
var socket;
if(this.client)
if(global.client!=undefined)
socket=client.socket;
else
socket=new Socket(argv[0]=="udp" ? SOCK_DGRAM : SOCK_STREAM,"test");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment