Once again, always use TCP. (Use UDP when low overhead is a necessity.) The first example is the sender program:

# Server
  print strftime() |& "/inet/tcp/8888/0/0"

The receiver is very simple:

# Client
  "/inet/tcp/0/localhost/8888" |& getline
  print $0

TCP guarantees that the bytes arrive at the receiving end in exactly the same order that they were sent. No byte is lost (except for broken connections), doubled, or out of order. Some overhead is necessary to accomplish this, but this is the price to pay for a reliable service. It does matter which side starts first. The sender/server has to be started first, and it waits for the receiver to read a line.