XBee data transfer


I have XBee S6B WiFi module and i want to read data on it’s all available pins with some intrerval. I’m using ATIR option and set that module must operate in API mode and send data to my computer.
It’s sending me some data to some port using UDP protocol. Don’t know what this port is and don’t know how to read this data from this port. Thats not TCP port, thats all i know.

I need to get what I want. Module must read data from it’s pins and sending it to my computer by the TCP protocol in some port, which i can open and read this data.

Can someone explain me how to do this?

The port the data is being sent to is determined by the CO and DE commands which are software settable. The use of the protocol used is determined by the IP command.