Moved sock structs in xtransport from stack to heap