Socket write changes