Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: html2doc server connection dies early

by pg (Canon)
on Oct 23, 2005 at 02:36 UTC ( #502274=note: print w/ replies, xml ) Need Help??


in reply to html2doc server connection dies early

It could well be an illusion when yuo said that the connection died early. I noticed that you didn't binmode() the socket - $client. When you read the content of the word document, you did binmode() the file handler, but then you print the same content to a socket without binmode(). That is not correct.

My guess is that the content get cut short because there was no binmode(), which then made you thought that the connection died.

binmode($client);


Comment on Re: html2doc server connection dies early
Download Code
Re^2: html2doc server connection dies early
by IdleResonance (Acolyte) on Oct 23, 2005 at 03:35 UTC
    If this is the case, then why does it work on some connections? Also, I am fairly certain that it is dying early because I run Windows under VMware, so I can look at the output of both at the same time. When socat creates an empty file instead of a Word document, it ends during the server output about opening and writing the temporary files. Either case, the same output is printed on the console. Anyway, I just tried adding binmod($client) to the top of the while loop; worked twice, empty file twice. Thanks anyway.
      Timeouts?

      Generic, unsubstantiated possibility:
      The system may (or, may not) time out after identical wall_clock durations... and the time it takes for your connection to the source to complete its work may well vary.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://502274]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-12-29 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (188 votes), past polls