Hello to all --
I think I have it working -- I took your suggestion, cdlvj, and put the recv function in a loop until the data received contains the end-of-message characters that are standard for HL7 (script is below). I added a print statement in the loop, so it says "looping...." each time...
I was thinking along the same lines (about MTU, I mean). Did some sending from XP to linux with Ethereal capturing. I can see that, for a message of size 3316, it sends 1260, then 1260, then 796. Using the receive script below, it only ever records the first 1260. Using the script above --...
The server is courtesy Bob Dilworth in Toledo, Ohio... below is the meat and potatoes of it (left out subroutines to build a reply message). The receive size has been set to 5120, so it isn't just a case of truncation. And it works fine when linux is doing the sending. But if perl running on...
Hi --
I am testing perl scripts to send/receive. The receiver runs on linux. I have an identical sender script that I invoke either on the same linux box, or on a windows XP box. If the file I'm sending contains a long-ish block of text (more than about 2K), the linux -> linux transfer seems...
Hi group --
I'm working more on perl scripts to send and receive HL7 messages.
Attached are two very simple scripts that I took from O'Reilly Advanced Perl Programming book (pgs 192 - 193). I'm working with two systems, one XP, the other RedHat 9.0.
The scripts work if:
1. sending/receiving...
Yup...hl7. I have had a "dumb-as-a-post" perl script in place for some time now that just opens a socket, sends a message, then closes. Doesn't bother to wait for an ack, etc. I need to receive messages, now, and send acks... so figured I'd look around for established scripts rather than...
Thanks for everyone's help. I'm making "some" progress...I'm doing this on a redhat box. Wrote one script for server (as per your examples), and wrote another for sender. I can see, when running both scripts on same box, that messages show up. So I have to guess that the problem is the other...
Thanks for the script... perl complains that it's missing a curly brace... after the @lines, maybe? At any rate, on my system, this script (and others like it from the Advanced Perl Programming book, CH 12), hangs on the
while ($new_sock = $main_sock->accept()) {
line. Last few lines of...
Hi to any and all --
I'm trying to build a script to listen on a port, accept an incoming connection, and write the incoming data to a file. I've seen some examples, but am confused by using read or recv. I've also seen something like:
...
while ($new_sock = $sock->accept()) {
while...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.