add TCP query support