socket and acceptor: basic implementation