implement rpc server, now block mode is ok, and binaries of examples run ok.