implemented session dependent socket connections