sending message when connection closed + tests
added message when new connection is open
moved open and close to broadcast addresses