rem: Timer.uSleep(10000); 
context: function connect(host,port) {  // TODO: we assume 1.333:1, restore settings  // BUG: not all characters are displayed by current video  // backend !!!  // this could be a security problem!!  // example: connect to sicher.de but really connect to  // sicher.de  var sx=1+1/3,sy=1;  var i;  var welcome="    Welcome to EGachine "+EGachine.version.string+"    ";  var constr="Connect to";  var s=welcome+"\n\n"+constr;  Video.setViewportCoords({left:0,right:sx,bottom:0,top:sy});  var maxlen=Math.max(welcome.length,constr.length);  var inputField=new InputField(host+":"+port,maxlen);  i=0.01;  var start=Timer.getTimeStamp();  var last=start;  var dt;  var blink=true;  var blinkStamp=last;  while (!inputField.done) {    now=Timer.getTimeStamp();    dt=(now-last)/1000000.0;    last=now;    if (i<sx/maxlen) i+=dt/50;    Video.clear();    Video.pushMatrix();    Video.translate(sx/2,3/4*sy);    Video.scale(i,i*1.3);    Video.drawText(s,true);    Video.translate(0,-3);    Video.pushMatrix();    Video.translate(0,0.5);    Video.pushColor();    Video.drawQuad(inputField.text.length+2+0.1,1+0.1);    Video.setColor(0.3,0.3,0.3);    Video.drawQuad(inputField.text.length+2,1);    Video.popColor();    Video.popMatrix();    Video.drawText(inputField.text,true);        if (now-blinkStamp>300000) {      blinkStamp=now;      blink=!blink;    }    if (blink) {      Video.pushMatrix();      Video.translate(inputField.text.length/2,0);      Video.drawText("_");      Video.popMatrix();    }    Video.translate(0,-1);    Video.drawText("\n\n\npress escape to quit",true);    Video.popMatrix();    Video.swapBuffers();    Timer.uSleep(10000);    Input.poll();  }  Input.charMode(false);  var hp=inputField.text.split(":",2);  host=hp[0];  port=hp[1];  // TODO: in the moment we can't handle errors  // if we could we could print an error message  // Note: egachine allows only to try once  // to establish an outgoing connection for security reasons  // (perhaps we could allow 2 or 3 trials)  stream=Net.connect(host,port);}
meta: 8182	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8182/566d0bbf1038f89a6a4124f1e19fd2a773434f9b/client.js/clean/egachine/src/examples/client/client.js