register socket after connect
add server-side and client-side base methods for locking