wavelength 1.0.0
Loading...
Searching...
No Matches
AsyncInfo Class Reference

An asynchronous transfer on one connection, as the EE describes it to the module. More...

#include <asyncinfo.h>

Collaboration diagram for AsyncInfo:

Public Types

enum  List { kListRead = 0 , kListSend = 1 }
 Lists DumpList() can display. More...

Public Member Functions

bool StartReadThread ()
 Start the thread that receives on the connection.
bool StartSendThread ()
 Start the thread that sends on the connection.
void AppendRead ()
 Add the transfer to the receiving list.
void AppendSend ()
 Add the transfer to the sending list.
int PollBlocks (bool blocks, bool sending, bool *available)
 Report whether data is waiting.

Static Public Member Functions

static AsyncInfo * FindRead (int cid)
 Find the receiving transfer of a connection.
static AsyncInfo * FindSend (int cid)
 Find the sending transfer of a connection.
static bool StopReadThread (int cid, int timeout)
 Stop and delete the receiving thread of a connection, then remove and free its transfer.
static bool StopSendThread (int cid, int timeout)
 Stop and delete the sending thread of a connection, then remove and free its transfer.
static void DumpList (int list)
 Print the transfers of one list and the state of their threads.

Public Attributes

int mDataWaitingSize
int mLastReturnedFlag
int mMaxPacketSize
unsigned int mReserved
int mCid
int mInetFlag
unsigned int mBufferSize
unsigned char * mBufferStart
AsyncInfo * mOtherProcessorsInfo
AsyncInfo * mNext
int mThid
unsigned char * mOtherWriteLoc
int mClose
int mType
int mRemotePort
unsigned int mWriteOffset

Static Public Attributes

static AsyncInfo * sReadList
 First transfer of the receiving list.
static AsyncInfo * sSendList
 First transfer of the sending list.

Detailed Description

An asynchronous transfer on one connection, as the EE describes it to the module.

A thread of the module receives into or sends from the IOP copy of the buffer and mirrors the buffer and this record into EE memory by SIF DMA. TCP connections transfer a byte stream. UDP and raw connections transfer datagrams through a ring buffer of AsyncBlock records.

The module was built without RTTI. The name comes from the module's state dump.

Member Enumeration Documentation

◆ List

Lists DumpList() can display.

Enumerator
kListRead 

Receiving transfers.

kListSend 

Sending transfers.

Member Function Documentation

◆ StartReadThread()

bool AsyncInfo::StartReadThread ( )

Start the thread that receives on the connection.

A datagram connection gets its ring buffer first.

Returns
False on success, true when a datagram does not fit the buffer or no thread starts.
Ghidra address:
NTSC-U/C: 0x00001a8c
Ghidra address:
PAL: 0x00001a4c

◆ StartSendThread()

bool AsyncInfo::StartSendThread ( )

Start the thread that sends on the connection.

A datagram connection gets its ring buffer first.

Returns
False on success, true when a datagram does not fit the buffer or no thread starts.
Ghidra address:
NTSC-U/C: 0x00001b40
Ghidra address:
PAL: 0x00001afc

◆ AppendRead()

void AsyncInfo::AppendRead ( )

Add the transfer to the receiving list.

Ghidra address:
NTSC-U/C: 0x00001e24
Ghidra address:
PAL: 0x00001dd0

◆ AppendSend()

void AsyncInfo::AppendSend ( )

Add the transfer to the sending list.

Ghidra address:
NTSC-U/C: 0x00001e74
Ghidra address:
PAL: 0x00001e20

◆ FindRead()

AsyncInfo * AsyncInfo::FindRead ( int cid)
static

Find the receiving transfer of a connection.

Parameters
cidConnection identifier.
Returns
The transfer, or null.
Ghidra address:
NTSC-U/C: 0x00001fac
Ghidra address:
PAL: 0x00001f58

◆ FindSend()

AsyncInfo * AsyncInfo::FindSend ( int cid)
static

Find the sending transfer of a connection.

Parameters
cidConnection identifier.
Returns
The transfer, or null.
Ghidra address:
NTSC-U/C: 0x00001fe4
Ghidra address:
PAL: 0x00001f90

◆ StopReadThread()

bool AsyncInfo::StopReadThread ( int cid,
int timeout )
static

Stop and delete the receiving thread of a connection, then remove and free its transfer.

Parameters
cidConnection identifier.
timeoutMicroseconds to wait for the thread to become dormant, polling every 100.
Returns
True when the transfer was freed.
Ghidra address:
NTSC-U/C: 0x00001bf4
Ghidra address:
PAL: 0x00001bac

◆ StopSendThread()

bool AsyncInfo::StopSendThread ( int cid,
int timeout )
static

Stop and delete the sending thread of a connection, then remove and free its transfer.

Parameters
cidConnection identifier.
timeoutMicroseconds to wait for the thread to fall asleep, polling every 100.
Returns
True when the transfer was freed.
Ghidra address:
NTSC-U/C: 0x00001cf8
Ghidra address:
PAL: 0x00001cac

◆ DumpList()

void AsyncInfo::DumpList ( int list)
static

Print the transfers of one list and the state of their threads.

Parameters
listA List.
Ghidra address:
NTSC-U/C: 0x0000201c
Ghidra address:
PAL: 0x00001fc8

◆ PollBlocks()

int AsyncInfo::PollBlocks ( bool blocks,
bool sending,
bool * available )

Report whether data is waiting.

Parameters
blocksTrue for a datagram connection.
sendingFor a datagram connection, true to test the block at the write offset, false to search for a complete block.
availableSet when data is waiting.
Returns
Zero, or the error of the search.
Ghidra address:
NTSC-U/C: 0x000035b0
Ghidra address:
PAL: 0x00003420

Member Data Documentation

◆ sReadList

AsyncInfo* AsyncInfo::sReadList
static

First transfer of the receiving list.

◆ sSendList

AsyncInfo* AsyncInfo::sSendList
static

First transfer of the sending list.

◆ mDataWaitingSize

int AsyncInfo::mDataWaitingSize

Bytes waiting, or a negative error.

◆ mLastReturnedFlag

int AsyncInfo::mLastReturnedFlag

Flags of the last transfer.

◆ mMaxPacketSize

int AsyncInfo::mMaxPacketSize

Largest datagram.

◆ mReserved

unsigned int AsyncInfo::mReserved

Never touched by the module.

◆ mCid

int AsyncInfo::mCid

Connection identifier.

◆ mInetFlag

int AsyncInfo::mInetFlag

Flags passed to each transfer.

◆ mBufferSize

unsigned int AsyncInfo::mBufferSize

Size of the buffer.

◆ mBufferStart

unsigned char* AsyncInfo::mBufferStart

The buffer.

◆ mOtherProcessorsInfo

AsyncInfo* AsyncInfo::mOtherProcessorsInfo

The EE copy of this record.

◆ mNext

AsyncInfo* AsyncInfo::mNext

Next transfer of the list.

◆ mThid

int AsyncInfo::mThid

Transfer thread.

◆ mOtherWriteLoc

unsigned char* AsyncInfo::mOtherWriteLoc

The EE copy of the buffer.

◆ mClose

int AsyncInfo::mClose

1 when the thread must stop.

◆ mType

int AsyncInfo::mType

A #sceInetType.

◆ mRemotePort

int AsyncInfo::mRemotePort

Remote port.

◆ mWriteOffset

unsigned int AsyncInfo::mWriteOffset

Offset of the current block of the ring buffer.


The documentation for this class was generated from the following file: