I am testing a chat bot and want to gracefully handle for times when the chat server isn't running so it can come back up when the service is available again. I have the programming handled. My question is how to test this when the downtimes are not reliable. Someone suggested "Terminate the socket connection manually". How would I do this?
This is a console node.js running on Mountain Lion. Can I sever a connection to a server from a single application?