initial almost-working support for tcp
minor fixes for rmx and tcp code