You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our API for receiving messages is efficient right now in that it avoids copying the payload, and also returns multiple messages at once, reducing the per-call overhead.
We should make a similar API for sending a message. The app would fill out a buffer and a message structure (or multiple such structures) and then pass them all off to the API to be dispatched at once.
The main sticking point is in the management of the buffer. Probably the app would provide a callback function to free their buffer. But I think we want to always allocate the actual message structures.
The text was updated successfully, but these errors were encountered:
Moved them to ISteamNetworkingUtils, which is now actually shared Steam (mostly) with a real accessor and and interface, and not a dummy interface object with all static methods.
Connection settings have a system of inheritance, so they can be set globally, per SteamNetworkingSockets interface, per listen socket, or per connection.
Deleted the config variable to simulate fake *message* loss. That is not useful.
Introduced STEAMNETWORKINGSOCKETS_ENABLE_SDR define, to make it more clear why code is being #ifdef'ed out. (E.g. if we open-sourced that code, we would want that included.)
Replaced ESteamNetworkingSendType with a basic flags bitmask.
Cleaned up a bunch of comments.
Changed SteamNetworkingMessage_t release mechanism. Now the callback is only to free the buffer, and it's assumed that this API will manage the actual objects. (This is important because the actual type is a derived type and has extra stuff on the end.) Also laid some groundwork for user management of message objects. (Relevant for issue #51.)
Working towards being able to use this object in a new API to send messages
efficiently. (Issue #51.)
- Message objects are actually ref counted now.
- m_sender renamed to m_identityPeer
- Added a flags field. Now you can know if the received message was sent
reliable or not.
- Added inline protected destructor to enforce proper usage.
- Tweaked tons of comments
- When receiving a fragmented unreliable message, I found a place where we
were doing more memory allocations and memcpying than necessary and
optimized that.
Delete a #ifdef __cplusplus block. This whole file is using tons of C++
features. It was weird to have that one block have that #ifdef
Also: In ConnectionState_ProblemDetectedLocally and ConnectionState_FinWait,
don't try to take any action immediately. Just trigger an immediate wake up
call, and we will take that action back out in the main loop, where we know
what's higher up on the call stack and what is safe to do.
Our API for receiving messages is efficient right now in that it avoids copying the payload, and also returns multiple messages at once, reducing the per-call overhead.
We should make a similar API for sending a message. The app would fill out a buffer and a message structure (or multiple such structures) and then pass them all off to the API to be dispatched at once.
The main sticking point is in the management of the buffer. Probably the app would provide a callback function to free their buffer. But I think we want to always allocate the actual message structures.
The text was updated successfully, but these errors were encountered: