Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.


Replies are listed 'Best First'.
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.

      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://502274]
[LanX]: well as long as they are your *own* testicles...
[Discipulus]: oh and only with your left hand!
LanX is relieved!
marto wonders what the hell people are talking about
[LanX]: oh 9 downvotes ... Nick must be back :)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-04-26 10:16 GMT
Find Nodes?
    Voting Booth?