Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why does this server doen't come on screen until the client connects

Status
Not open for further replies.

Phalanx1

Programmer
Jul 21, 2003
128
US
this is the server hta

<script language=&quot;PerlScript&quot;>
use Win32::pipe;
$Pipe = new Win32::pipe(&quot;My_Pipe&quot;);
$Pipe->Connect();
$Pipe->Write(&quot;<textarea>$0</textarea></html>&quot;);
$Pipe->Close();
</script>

This is the client.

<html><head><title>The Client Side</title><body><div id=&quot;Response&quot;></div><script language=&quot;PerlScript&quot;>
open(CLIENT, &quot;< \\\\.\\Pipe\\My_Pipe&quot;)|| die;
$Data = <CLIENT>;
$window->document->getElementById(Response)->insertAdjacentText(&quot;$Data&quot;);
close(CLIENT);
</script></body></html>

Now the Client only Connect if the Server is running obviosly and dies otherwise.
now it does't give any error message like Died a line 3 when i start the client after the server, but doesn't output like it should. any help, appreciated.


 
Mabye WE should take off the </html>replace with </body></html> remove the other </body> and </html>in the client
<script language=&quot;PerlScript&quot;>
use Win32::pipe;
$Pipe = new Win32::pipe(&quot;My_Pipe&quot;);
$Pipe->Connect();
$Pipe->Write(&quot;<textarea>$0</textarea></body></html>&quot;);
$Pipe->Close();
</script>
<html><head><title>The Client Side</title><body><div id=&quot;Response&quot;></div><script language=&quot;PerlScript&quot;>
open(CLIENT, &quot;< \\\\.\\Pipe\\My_Pipe&quot;)|| die;
$Data = <CLIENT>;
$window->document->getElementById(Response)->insertAdjacentText(&quot;$Data&quot;);
close(CLIENT);
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top