add explicit public interface
update server final close message
refactoring