Send txt file thourgh TCP
Hi,
I'm trying to send a txt file over TCP.
The txt file contains lines, every line has a fixed length : 179 characters , however it seems that this length vary while sending it!
So, I need to send the content of the txt file as it is without adding anything.
I'm using as operation EnsLib.TCP.PassthroughOperation.
I need your help please.
Thanks !
Discussion (3)0
Comments
try to encode / decode your text to base64 to make sure you don't get in conflict with transmission control chars.
and if you write this string to a %Stream.FileCharacter It's a file again.
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Stream.FileCharacter
and your file is base64 encoded