When creating a framer which will mark ready, we can't seem to get a reply to the first outgoing message sent by the framer, e.g. of the style:
< 220 Service ready for new user.\r\n
> AUTH TLS\r\n
< 234 Command AUTH okay; starting TLS connection.\r\n
The incoming message starting 234
is never received by the framer unless it marks ready right after sending the AUTH
line. It looks like this is intentional but we can't understand why this is prevented given the framer should probably check the reply before attempting to prepend e.g. a TLS protocol on the stack (may depend on return code).
The dependency seems to be that marking ready will allow the next read, but prevent prepending, and prepending will immediately trigger the TLS handshake, and it will consume the 234
line. It looks like "pass through" can be called any time, before or after, but that requires another protocol on the stack to do the work.
Do we need to have one framer read the first message and send one message then mark ready and pass through, prepend another identical framer to read the next message then make the decision to prepend TLS, then prepend again for the "decrypted" framer to read the actual application protocol?
We're doing this in C/ObjC, but I figured the Swift terminology might help in the title. Apologies if this was already asked somewhere, I couldn't find a good match.