use SocketAgent interface

test on local machine.
do we really need above 4 methods?