Socktest implementation.