Made clientConnection with object writing