Finally got 2 peers talking to each other properly!

09Aug09

After what seems like an age banging my head against a brick wall, I’ve finally worked out why my peers couldn’t quite talk properly. I was attempting to return an NSImage as a distributed objects parameter. This worked fine if the object was distributed on the same physical machine, but as soon as I tried to send it to another peer, it just didn’t work and more strangely actually displayed the images on the bottom left hand corner of the senders window, very strange. Anyway, the fix (as always) was simple. I encoded the NSImage TIFFRepresentation as an NSData object and sent that over then decoded at the far side. This screenshot shows the results of that labour, most satisfying! Now onto building an app out of all these bits I’ve constructed…

Distributed Peers talking to each other

On the left is this computer’s information and on the right is the received Peer information (the lock/unlock icons are just hard coded at the moment.

Advertisement


No Responses Yet to “Finally got 2 peers talking to each other properly!”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.