createConnectionFunction

Creates a connection function.