Generalized socket flow.
Trying to figure out merge.