I reworked the way we manage things listening in to the socket to add a proper listener module instead of having it all in the handle command function. The handle command function worked until now but now that we want commands that expect more data than just one line we do need to expand it to something more streamlined. Commands can now register listeners on the feed from the socket and remove them as they please in order for them to get the required data. We also added a few commands and Idling which allows email clients to idle instead of just sit and poll the server for new mail. I kinda changed the process buffer function so that it can dynamicly figure out if the newline is crlf or lf instead of guess and so it includes that in it’s output. Because we now have listeners we can now add the append command and it will recieve a stream of data from the listener.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.