PSPSDK 2024-10-31
|
Go to the source code of this file.
Data Structures | |
struct | pspAdhocMatchingMember |
Linked list for sceNetAdhocMatchingGetMembers. More... | |
struct | pspAdhocPoolStat |
Linked list for sceNetAdhocMatchingGetMembers. More... | |
Typedefs | |
typedef void(* | pspAdhocMatchingCallback) (int matchingid, int event, unsigned char *mac, int optlen, void *optdata) |
Matching callback. | |
Enumerations | |
enum | pspAdhocMatchingEvents { PSP_ADHOC_MATCHING_EVENT_HELLO = 1 , PSP_ADHOC_MATCHING_EVENT_JOIN = 2 , PSP_ADHOC_MATCHING_EVENT_LEFT = 3 , PSP_ADHOC_MATCHING_EVENT_REJECT = 4 , PSP_ADHOC_MATCHING_EVENT_CANCEL = 5 , PSP_ADHOC_MATCHING_EVENT_ACCEPT = 6 , PSP_ADHOC_MATCHING_EVENT_COMPLETE = 7 , PSP_ADHOC_MATCHING_EVENT_TIMEOUT = 8 , PSP_ADHOC_MATCHING_EVENT_ERROR = 9 , PSP_ADHOC_MATCHING_EVENT_DISCONNECT = 10 , PSP_ADHOC_MATCHING_EVENT_DATA = 11 , PSP_ADHOC_MATCHING_EVENT_DATA_CONFIRM = 12 , PSP_ADHOC_MATCHING_EVENT_DATA_TIMEOUT = 13 } |
Matching events used in pspAdhocMatchingCallback. More... | |
enum | pspAdhocMatchingModes { PSP_ADHOC_MATCHING_MODE_HOST = 1 , PSP_ADHOC_MATCHING_MODE_CLIENT = 2 , PSP_ADHOC_MATCHING_MODE_PTP = 3 } |
Matching modes used in sceNetAdhocMatchingCreate. More... | |
typedef void(* pspAdhocMatchingCallback) (int matchingid, int event, unsigned char *mac, int optlen, void *optdata) |
Matching callback.
Matching events used in pspAdhocMatchingCallback.
Abort a data send to a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to send the data to |
Cancel a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to cancel |
int sceNetAdhocMatchingCancelTargetWithOpt | ( | int | matchingid, |
unsigned char * | mac, | ||
int | optlen, | ||
void * | optdata | ||
) |
Cancel a matching target (with optional data)
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to cancel |
optlen | - Optional data length |
optdata | - Pointer to the optional data |
int sceNetAdhocMatchingCreate | ( | int | mode, |
int | maxpeers, | ||
unsigned short | port, | ||
int | bufsize, | ||
unsigned int | hellodelay, | ||
unsigned int | pingdelay, | ||
int | initcount, | ||
unsigned int | msgdelay, | ||
pspAdhocMatchingCallback | callback | ||
) |
Create an Adhoc matching object.
mode | - One of pspAdhocMatchingModes |
maxpeers | - Maximum number of peers to match (only used when mode is PSP_ADHOC_MATCHING_MODE_HOST) |
port | - Port. Lumines uses 0x22B |
bufsize | - Receiving buffer size |
hellodelay | - Hello message send delay in microseconds (only used when mode is PSP_ADHOC_MATCHING_MODE_HOST or PSP_ADHOC_MATCHING_MODE_PTP) |
pingdelay | - Ping send delay in microseconds. Lumines uses 0x5B8D80 (only used when mode is PSP_ADHOC_MATCHING_MODE_HOST or PSP_ADHOC_MATCHING_MODE_PTP) |
initcount | - Initial count of the of the resend counter. Lumines uses 3 |
msgdelay | - Message send delay in microseconds |
callback | - Callback to be called for matching |
Delete an Adhoc matching object.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
Get the optional hello message.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
optlen | - Length of the hello data |
optdata | - Pointer to the hello data |
Get a list of matching members.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
length | - The length of the list. |
buf | - An allocated area of size length. |
Get the maximum memory usage by the matching library.
int sceNetAdhocMatchingGetPoolStat | ( | struct pspAdhocPoolStat * | poolstat | ) |
Get the status of the memory pool used by the matching library.
poolstat | - A pspAdhocPoolStat. |
Initialise the Adhoc matching library.
memsize | - Internal memory pool size. Lumines uses 0x20000 |
int sceNetAdhocMatchingSelectTarget | ( | int | matchingid, |
unsigned char * | mac, | ||
int | optlen, | ||
void * | optdata | ||
) |
Select a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - MAC address to select |
optlen | - Optional data length |
optdata | - Pointer to the optional data |
Send data to a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to send the data to |
datalen | - Length of the data |
data | - Pointer to the data |
Set the optional hello message.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
optlen | - Length of the hello data |
optdata | - Pointer to the hello data |
int sceNetAdhocMatchingStart | ( | int | matchingid, |
int | evthpri, | ||
int | evthstack, | ||
int | inthpri, | ||
int | inthstack, | ||
int | optlen, | ||
void * | optdata | ||
) |
Start a matching object.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
evthpri | - Priority of the event handler thread. Lumines uses 0x10 |
evthstack | - Stack size of the event handler thread. Lumines uses 0x2000 |
inthpri | - Priority of the input handler thread. Lumines uses 0x10 |
inthstack | - Stack size of the input handler thread. Lumines uses 0x2000 |
optlen | - Size of hellodata |
optdata | - Pointer to block of data passed to callback |
Stop a matching object.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |