Processing received messages from server