Added connection encoding
Added event dispatcher interface