refactoring server to be compatible with new class
refactoring connection and instance
adding new tcp, udp, ws subclasses