A slice of memory that should be pooled and reused. Wraps a byte-array.
More...
A slice of memory that should be pooled and reused. Wraps a byte-array.
This is a serializable datatype for the .Net clients. It will serialize and transfer as byte[]. If PhotonPeer.UseByteArraySlicePoolForEvents is enabled, byte-arrays in (incoming) events will be deserialized as ByteArraySlice.
Adjust your OnEvent code accordingly.
◆ ByteArraySlice() [1/2]
ExitGames.Client.Photon.ByteArraySlice.ByteArraySlice |
( |
byte[] |
buffer, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 |
|
) |
| |
|
inline |
Create a new ByteArraySlice. The buffer supplied will be used. Usage is similar to ArraySegment.
Not part of pooling.
◆ ByteArraySlice() [2/2]
ExitGames.Client.Photon.ByteArraySlice.ByteArraySlice |
( |
| ) |
|
|
inline |
Creates a ByteArraySlice, which is not pooled. It has no Buffer.
Not part of pooling.
◆ Dispose()
void ExitGames.Client.Photon.ByteArraySlice.Dispose |
( |
| ) |
|
|
inline |
◆ Release()
bool ExitGames.Client.Photon.ByteArraySlice.Release |
( |
| ) |
|
|
inline |
If this item was fetched from a ByteArraySlicePool, this will return it.
- Returns
- True if this was a pooled item and it successfully was returned. If it does not belong to a pool nothing will happen, and false will be returned.
◆ Reset()
void ExitGames.Client.Photon.ByteArraySlice.Reset |
( |
| ) |
|
|
inline |
Resets Count and Offset to 0 each.
◆ Buffer
byte [] ExitGames.Client.Photon.ByteArraySlice.Buffer |
The buffer for the slice.
◆ Count
int ExitGames.Client.Photon.ByteArraySlice.Count |
The length of the data in the Buffer.
◆ Offset
int ExitGames.Client.Photon.ByteArraySlice.Offset |
The position where the content starts in Buffer.
The documentation for this class was generated from the following file: