socket client reading string

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

socket client reading string


I have developed socket server in delphi and socket client in mozilla javascript. The server sends string data to socket client. I am not sure how to read it. I tried the following:

var transportService = Components.classes[";1"].getService(Components.interfaces.nsISocketTransportService);
var transport = transportService.createTransport(null,0,'',4444,null);

var stream = transport.openInputStream(0,0,0);
var instream = Components.classes[";1"]
var chunk =;
alert(chunk); // gives me blank, even though i send some string from the server

Please guide me and tell me what I am doing wrong.

Thank you.