Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco idiom for auto-reconnecting SocketConnector

A general discussion forum.

Poco idiom for auto-reconnecting SocketConnector

Postby SalvorHardin » 01 Oct 2010, 19:08

What is the preferred way to provide auto-reconnect features on the client, when using SocketReactor/SocketConnector?

I found a related question on StackOverflow (dated April 30, 2010):

Socket select() Handling Abrupt Disconnections [using Poco's SocketReactor]
http://stackoverflow.com/questions/2742708/socket-select-handling-abrupt-disconnections

I have a shamefully ugly way of auto-reconnecting that works in a demo project, but am looking for something better.

Also, I'm wondering if reconnecting with SocketConnector should be part of the Poco library.
SalvorHardin
 
Posts: 29
Joined: 24 Aug 2010, 14:47

Re: Poco idiom for auto-reconnecting SocketConnector

Postby SalvorHardin » 19 Oct 2010, 03:27

Never mind, someone (probably me) was calling SocketReactor::stop() from SocketConnector::onError() and that made reconnecting a kludge.

ps

Seems it is never too late to switch to tdd and gmock. Better late than never. :)
SalvorHardin
 
Posts: 29
Joined: 24 Aug 2010, 14:47


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests