adding const modifier to server connection callback