In-progress connection code.