You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy could be used to transfer files between instances. All that is need is some additional meta-data, probably in the header, though it could be encoded even in the existing UInt, but let's not be too frugal.
The new meta-data should be a bool saying "Do we do a file transfer now?", and if so the data with its already present size, should be treated like a file and saved somewhere, as opposed to a hostname message.
The text was updated successfully, but these errors were encountered:
Well, there's the UI part and there's the networking part.
From the networking part, we need to extend the HowdyMessageHeader struct to include a bool, I think. This should tell is if the incoming message is a hostname message, were all you get is a string of a hostname to list it.
On the other hand, if the bool (say isFileTransfer, but maybe an enum Operation with two cases hostName and fileTransfer is a better idea) is coming set to true then we treat the incoming bytes (Data) as a file, no a string.
We can then check for this bool or enum in HowdyProtocol class' handleInput, this is were we are called by Network.framework every time we receive some bytes (the buffer) in order to form them into a higher order message (this is our protocol, the heart of it).
So HowdyProtocol's handleInput and handleOutput are the low-level methods that form the message for the higher-level receiveMessage and send .
So it's in the higher-level send were would decide what message to send, and the in handleInput to repare it for receiveMessage
Howdy could be used to transfer files between instances. All that is need is some additional meta-data, probably in the header, though it could be encoded even in the existing
UInt
, but let's not be too frugal.The new meta-data should be a
bool
saying "Do we do a file transfer now?", and if so the data with its already present size, should be treated like a file and saved somewhere, as opposed to ahostname
message.The text was updated successfully, but these errors were encountered: