changed ReliableSocket to take Socket as parameter; added listeners and send/write

changed ReliableSocket to take Socket as parameter; added listeners and send/write