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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. codelady7

    socket help with long text blocks

    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...
  2. codelady7

    socket help with long text blocks

    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 --...
  3. codelady7

    socket help with long text blocks

    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...
  4. codelady7

    socket help with long text blocks

    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...
  5. codelady7

    perl send and receive scripts

    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...
  6. codelady7

    IO::Socket::INET -- use read or recv?

    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...
  7. codelady7

    IO::Socket::INET -- use read or recv?

    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...
  8. codelady7

    IO::Socket::INET -- use read or recv?

    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...
  9. codelady7

    IO::Socket::INET -- use read or recv?

    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...

Part and Inventory Search

Back
Top