tweaked Driver to opportunistically write
limit how many messages the server will buffer