Skip to content

Transfer data using CPDistributedMessagingCenter between 2 or more clients.

License

Notifications You must be signed in to change notification settings

uroboro/client2client-ipc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

client2client-ipc

Transfer data using CPDistributedMessagingCenter between 2 or more clients.

How to send data to the server

This will dispatch the same data to all listening clients:

CPDistributedMessagingCenter * center = [CPDistributedMessagingCenter centerNamed:@"com.your.tweak"];
NSDictionary * dictionary = @{ @"key" : @"value" };
[center sendMessageName:@"set" userInfo:dictionary];

How to retrieve data from the server

This will dispatch the same data to all listening clients:

CPDistributedMessagingCenter * center = [CPDistributedMessagingCenter centerNamed:@"com.your.tweak"];
NSDictionary * reply = [center sendMessageAndReceiveReplyName:@"get" userInfo:nil];
NSLog(@"current configuration: %@", reply);

About

Transfer data using CPDistributedMessagingCenter between 2 or more clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published