FILE message

Peer-to-Peer discussion group for CSC 445

Moderator: jaf656s

Matt

FILE message

Post by Matt »

Right now, the message has the header info and then two new lines and then the data. Could it be that the header is also terminated by the * to make it easier for parsing?

If the message could be changed to that, then I could read the FILE header until I see the * line with a generic reader and then switch to another reader for the file handling a lot easier. Otherwise, I have to detect it's a FILE header and try to handle it while I'm still reading the header. Doable, but less enjoyable.
User avatar
Paco103
Single White Admin
Posts: 629
Joined: January 15, 2004, 9:22 pm
Location: Right Here
Contact:

Post by Paco103 »

You will have to detect what type of message is coming in with the first line for all messages anyway, unless you're reading each line and then parsing, which would seem even more complicated to me. Basically you will have to know this is a file message before that point anyway, because if you start reading the data with a line reader you will end up with corrupt data.
Post Reply