add client/server onData callbacks