Adding observer to asyncsocketmiddleware

See issue #124