[Gambas-devel] [RFC] Gambas implementation of the pop3 protocol

Sebastian Kulesz sebikul at ...176...
Fri Aug 24 05:39:36 CEST 2012


Hi! I made a component to implement the pop3 protocol purely in Gambas
and wanted some feedback on how the API should be implemented.

Right now there is an exported class called Pop3Client that wraps the
call depending if the connection should be encrypted or not using 2
sub classes (TCPClient & SSLClient) which share the same API. If it is
encrypted, an openssl process is used to execute the commands and read
the response, if it's not, a plain socket is used.

At first i wanted to include asynchronous support, but it was REALLY
buggy and difficult to implement, so i left it synchronous. A list of
the implemented commands can be found at the top of the
Pop3Client.class file. Although the user can use the Pop3Client.Send()
call directly to send any command, their implementation should return
the data on a semi parsed form

I'm not sure how the API should be implemented and if the structure
i'm using is the best approach. How would you implement the protocol?
How would you abstract encrypted and non encrypted connections so that
the difference cannot be seen by the developer?
When executing a command that requires a large amount of data to be
downloaded (e.g retrieve a message with attachments), subsequent calls
can be overlapped, is there a way to avoid this?

* Protocol specifications: http://tools.ietf.org/html/rfc1939

Thanks a lot!!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pop3Client-0.0.1.tar.gz
Type: application/x-gzip
Size: 8439 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120824/7c3769db/attachment.bin>


More information about the Devel mailing list