It's a little unclear as to what you're doing. Do you have a string, flatten it, do a UDP Write? Then at the receiver, do a UDP Read and then Write Characters to File? You don't mention doing an unflatten from string anywhere. If you flatten it before sending, you have to do an unflatten right after receiving it. Have you looked at the shipping examples called UDP Sender and UDP Receiver? They do pretty much the same thing except the reciever doesn't save the data to a file.