Re: code does not work properly when i remove alert
sugar_lisp <[email protected]> Fri, 26 Feb 2010 10:27:57 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Message-ID | <[email protected]> |
Does not work properly means code does get executed but the server does not
get the message. When I place the alert statement as shown below then the
sever gets the message.
Thank you for your time.
sugar_lisp wrote:
>
> Hi
>
> I am facing a strange problem, in the code below when i remove alert
> statement the client socket does not send data to the server. I have read
> some forums on this problem and they mentioned about giving some time
> delay but it does not work.
>
> var transportService =
> Components.classes["@mozilla.org/network/socket-transport-service;1"].getService(Components.interfaces.nsISocketTransportService);
> var transport =
> transportService.createTransport(null,0,'127.0.0.1',4444,null);
> var outstream = transport.openOutputStream(0,0,0);
> alert('Sending Data'); //when i remove this statement the code does not
> work properly
>
> var len = y.length+'\n'+'';
> outstream.write(len,len.length);
> outstream.write(y,y.length);
> outstream.flush();
>
> Please do let me know the solution to this problem.
>
--
View this message in context: http://old.nabble.com/code-does-not-work-properly-when-i-remove-alert-tp27695202p27721795.html
Sent from the Mozilla - JavaScript Debugger mailing list archive at Nabble.com.