Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Writing a HylaFAX client...
Hi y'all,
I'm seriously thinking of writing Yet-Another-HylaFAX-Client, but
the main problem I have at the moment is that I don't quite understand
just how the data-transfer from client -> host works at the moment.
The output from "sendfax -v -v" helps quite a bit:
Trying localhost (127.0.0.1) at port 4559...
Connected to localhost.pinnacle.co.nz.
220 kiwi.pinnacle.co.nz server (HylaFAX (tm) Version 4.0pl1) ready.
-> USER jonc
[snip-text-conversion-match-stuff]
-> TYPE I
200 Type set to Image.
SEND compressed data, 7938 bytes
-> PORT 127,0,0,1,7,67
200 PORT command successful.
-> MODE Z
200 Mode set to ZIP.
-> STOT
150 FILE: /tmp/doc179.ps (Opening new data connection).
SEND 2900 bytes transmitted (2.7x compression)
226 Transfer complete (FILE: /tmp/doc179.ps).
-> JNEW
200 New job created: jobid: 95 groupid: 95.
-> JPARM FROMUSER "Jonathan Chen"
213 FROMUSER set to "Jonathan Chen".
-> JPARM LASTTIME 000300
213 LASTTIME set to 000300.
[snip-lotsa-JPARM-stuff]
-> JPARM PAGECHOP "default"
213 PAGECHOP set to "default".
-> JPARM CHOPTHRESHOLD 3
213 CHOPTHRESHOLD set to 3.
SEND compressed data, 8966 bytes
-> PORT 127,0,0,1,7,69
200 PORT command successful.
-> STOT
150 FILE: /tmp/doc180.ps (Opening new data connection).
SEND 3403 bytes transmitted (2.6x compression)
226 Transfer complete (FILE: /tmp/doc180.ps).
-> JPARM COVER /tmp/doc180.ps
200 Added cover page document /tmp/doc180.ps as docq/doc95.cover.
-> JPARM DOCUMENT /tmp/doc179.ps
200 Added document /tmp/doc179.ps as docq/doc179.ps.95.
-> JSUBM
200 Job 95 submitted.
The control stuff looks pretty simple. It's the PORT command that
throws me somewhat. "127,0,0,1" refers to localhost IP-address, and
the last 2 numbers "7,67" (for the document) and "7,69" (for the
cover page) probably refers to the data port. The questions are:
1. how does "7,67"/"7,69" translate to a data-port?
2. And where did the client come up with that number? I was
always under the impression that the server had to be `listen'ing
on a particular port for a client connection; but nowhere in
the transcript did the HylaFAX server indicate which port the
client should use.
Help, anyone? I basically don't want to wade thru' the HylaFAX code at
the moment..
--
Jonathan Chen e-mail : jonc@pinnacle.co.nz
Pinnacle Software Ltd Voice : +64.9.415.4460
Auckland, New Zealand Fax : +64.9.415.4250