Dear All,
WHAT I WANT TO DO…
I have write a simple lucky draw programme in MAC computer, but the programme was not good enough, because i have to trigger the draw from my MAC computer.
To make it better, i was thinking to write a simple iPad programme that have only one “Draw” button. Which mean, the user just press “Draw” in iPad, and my MAC computer will start to draw.
MY UNDERSTANDING…
Well, this involve connecting my MAC computer with iPad through network.
I understand that i need to use TCPSocket in my programme. But unfortunately, after several days of searching, i have no idea where to start.
The XOJO book does not lead me to the solution. The example in internet mostly cover bit and pieces.
CONCEPT PROBLEM…
I think why i am stuck is because i never get to understand the process of how two device communicate.
This is how i think the devices talk. Am i missing anything?
- I need to use TCPsocket to set up a port in my MAC computer. (say port 1500, must exceed 1024 i guess)
- I need to use TCPsocket to set up a port in iPad. (say port 1500, must exceed 1024 i guess)
- Then i let my MAC computer go into wifi network (how this can be done?) and find iPad (how to do this?)
- Then i let my MAC computer connect to iPad.
- Then MAC computer can communicate to iPad.
Do i miss out anything?
a. conventionally we are using networking cable, so this could be straight forward, but now all become wireless (WIFI), so where is this WIFI come into picture?
b. Most of the internet documents only mention setting up the port, i assume that port is just a way where data is send out from computer or iPad. How about the identity of computer/iPad, how to let MAC computer find iPad (or iPad find MAC computer). Is it recognise purely base on computer name or iPad name.
c. How about after recognise my computer/iPad, how to connect to the application that i am running?
All of this has been in my mind, but i really could not figure a way, which process first, or whether it is needed.
Please help