Client and server channel implementation.