add method to support background socket