finish ossSocket encapsulation