You probably wouldn't send the UITouch
objects over the network (although you could if you wanted). I might package then touch positions into a struct of some kind and just send that to decrease the amount of traffic you were sending. If you needed the entire UITouch object and all of its data then sure, send the object to your server.
You could use CFNetwork
framework to send data to a server from your client application. If you do you should really try to use IPv6.
Apple have sample code here for working with CFNetwork streams
If you want to record the touch events, just use an NSArray
or an NSDictionary
if you wanted to store say the touch along with a timestamp for when the touch occurred.
Then just add each touch to the array or dictionary as the user makes them.
Update: I wouldn't waste your time with Apple's WiTap sample code. I've read though it before and there is a LOT of code in it that is just confusing and irrelevant if you want a simple client/server app up and running quickly. It will more than likely be way too confusing for you if you haven't done any network programming before.
I would get the network transfers working first, then if you like you can refer to WiTap for the Bonjour networking part so you can do auto discovery of the client and server. But add Bonjour support only after you have data steams working first.