Objective-C Client Reference
Class PIOMultiplayer
Language: Objective-C
The Multiplayer Service
Here's how to create/join a room and send and receive messages:
Methods | |||
---|---|---|---|
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (PIOServerEndpoint*) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
createJoinRoomWithRoomId:roomType:visible:roomData:joinData:successBlock:
Creates a multiplayer room (if it does not exist already) and joins it.
Arguments
NSString* | roomId |
NSString* | roomType |
BOOL | visible |
NSDictionary* | roomData |
NSDictionary* | joinData |
void(^)(PIOConnection*connection) | successBlock |
Throws
PlayerIOError |
createJoinRoomWithRoomId:roomType:visible:roomData:joinData:successBlock:errorBlock:
Creates a multiplayer room (if it does not exist already) and joins it.
Arguments
NSString* | roomId |
NSString* | roomType |
BOOL | visible |
NSDictionary* | roomData |
NSDictionary* | joinData |
void(^)(PIOConnection*connection) | successBlock |
void(^)(PIOError*error) | errorBlock |
createRoomWithRoomId:roomType:visible:roomData:successBlock:
Create a multiplayer room on the Player.IO infrastructure.
Arguments
NSString* | roomId |
NSString* | roomType |
BOOL | visible |
NSDictionary* | roomData |
void(^)(NSString*roomId) | successBlock |
Throws
PlayerIOError |
createRoomWithRoomId:roomType:visible:roomData:successBlock:errorBlock:
Create a multiplayer room on the Player.IO infrastructure.
Arguments
NSString* | roomId |
NSString* | roomType |
BOOL | visible |
NSDictionary* | roomData |
void(^)(NSString*roomId) | successBlock |
void(^)(PIOError*error) | errorBlock |
developmentServer
If set to non-nil value, rooms will be created on the development server at the address defined by the server endpoint, instead of using the live Player.IO servers.
Return Value
PIOServerEndpoint* | |
joinRoomWithRoomId:joinData:successBlock:
Join a running multiplayer room.
Arguments
NSString* | roomId |
NSDictionary* | joinData |
void(^)(PIOConnection*connection) | successBlock |
Throws
PlayerIOError |
joinRoomWithRoomId:joinData:successBlock:errorBlock:
Join a running multiplayer room.
Arguments
NSString* | roomId |
NSDictionary* | joinData |
void(^)(PIOConnection*connection) | successBlock |
void(^)(PIOError*error) | errorBlock |
listRoomsWithRoomType:searchCriteria:resultLimit:resultOffset:successBlock:
List the currently running multiplayer rooms.
Arguments
NSString* | roomType |
NSDictionary* | searchCriteria |
NSUInteger | resultLimit |
NSUInteger | resultOffset |
void(^)(NSArray*rooms) | successBlock |
Throws
PlayerIOError, PlayerIOError |
listRoomsWithRoomType:searchCriteria:resultLimit:resultOffset:successBlock:errorBlock:
List the currently running multiplayer rooms.
Arguments
NSString* | roomType |
NSDictionary* | searchCriteria |
NSUInteger | resultLimit |
NSUInteger | resultOffset |
void(^)(NSArray*rooms) | successBlock |
void(^)(PIOError*error) | errorBlock |
setDevelopmentServer:
If set to non-nil value, rooms will be created on the development server at the address defined by the server endpoint, instead of using the live Player.IO servers.
Arguments
PIOServerEndpoint* | developmentServer |