Context and Socket implementation