Socket wrapper for thread based PHP ApplicationServer implementation.