Ian wrote:With the current code tcp sending will start to block when the socket buffer is full. It needs the receiver to receive the data to unblock. We also used a blocking receive.
How can we improve things? How does it work on the real hw? It sends 64 requests? Does it just check once a frame to see if the data has actually been received?
Ian wrote:Sdl doesn't support asynchronous sockets. Generally such implementations are os specific. But you can easily just do the receiving in it's own thread so it doesn't block. It does the same. Using this approach we could easily just fill a vector array with the received data. Then the data can be read whenever the consumer needs it.
Maybe we could send the data like this
Struct DataChunk
{
Int addressOffset; // where we want to copy to
Int dataLength:
Uint8 data[0]; // c variable length array
}
I could just asynchronously fill a vector array with an array of DataChunk. Then this can be read whenever the consumer needs it.
Would this be sufficient? Or does anyone have any other suggestions.
I should add we can do something similar to stop tcp sends blocking. Just continously fill a buffer and have the sending work independently in it's own thread.
Spindizzi wrote:Super things
If you need some specific values offset for all other games (offset, size), I have logged them. These values are normally retrieved when ring network is builded , in your case, inside "netboard_state_init" and set in "netboard_state_testing". Number of cab present on the ring are also determined inside state init
and many thanks for your awesome huge work on asm dissassembler.
In case, and for more generic code:
nets->Send((const char*)CommRAM + 0x100, 0x3214);
offset 0x100 is the inverted bytes of CommRAM[0xc] (16b endian thing)
and
memcpy(CommRAM + 0x450, recv_data.data(), recv_data.size());
offset 0x450 is the inverted bytes of CommRAM[0x8] (16b endian thing)
can't wait to study your work
Users browsing this forum: No registered users and 1 guest