using Socket class