do-connect ( server port quot: ( host port -- stream ) attempts -- stream/f )


Vocabulary
irc.client.internals

Inputs
serveran object
portan object
quota quotation with stack effect ( host port -- stream )
attemptsan object


Outputs
stream/fan object


Definition


: do-connect
( server port quot: ( host port -- stream ) attempts -- stream/f )
dup 0 > [
[ drop ( host port -- stream ) call-effect ]
[ drop 15 sleep 1 - do-connect ] recover
] [ 4drop f ] if ;