Make better use of stream options
Closed this issue · 3 comments
set_stream/2
, has a nice set of options I initially overlooked. These options can be utilized to simplify and make the bot more robust and easier to work with. The documentation is available at: http://www.swi-prolog.org/pldoc/doc_for?object=set_stream/2.
A few options that caught my attention were:
* timeout(Seconds)
, which is interesting because this could eliminate the need to have a message queue waiting for activity with its own timeout specifications. I haven't implemented this yet, since the intended behavior in this regard is relatively stable. So proper testing of continued functionality needs to be ensured before I swap out the original implementation with this option.
buffer_size(+Size)
, which can potentially aid the bot in limiting the amount it processes at any given point in time.line_position(LinePos)
, which can have obvious applications with respect to state and decision making in various extensions.
On second thought, these are probably better to integrate in library(irc_client)
.
List has been updated to reflect changes I've recently made in library(irc_client)
.
v1.2.0 of irc_client
has corralled enough of the necessary implementation to take care of this issue by momentum.