Added both udp and tcp to a single class