use a buffered channel for socket writing