You have no idea how much of networking I learned from contributing to Smokey and trying to read Pham's code, school textbooks are kind of idiotic in comparison.
room topic changed to JavaScript & Mattress buying: Read this: http://rules.javascriptroom.com. Before asking inform yourself on the XY problem http://goo.gl/taIqf | Angular is on topic here stop asking. Don't ask to ask just ask. [ecmascript] [es6] [javascript]
And basically one time they teased me for closing questions on Stack Overflow, so I treated them with the way I liked; I shutted their computer down in the lab remotely.
If the server throttles, throw an exception so the user can determine whether to retry or not.
Actually, good question, I might add a default flag for the factory to throw an exception if the web agent hits the throttle, or for the user to disable that within the factory and automatically retry when we get throttled on sending the message.
Ideally I would schedule an asynchronous pend by extracting the number from the message, then schedule the "send message later" action.
If the flag is enabled by the user within the factory, and the throttle is reached, then instead of returning a successful boolean result from the method call, it throws an exception.