R wrapper switched to sockets