One way version with TCP/UDP support