Sdílet prostřednictvím


LocalNetworkGamer.SendData Method (Byte[], Int32, Int32, SendDataOptions)

Sends a selected portion of a byte array to all gamers in a session. This includes the gamer sending the packet.

Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework.Net (in microsoft.xna.framework.net.dll)

Syntax

public void SendData (
         byte[] data,
         int offset,
         int count,
         SendDataOptions options
)

Parameters

  • data
    Type: Byte
    Byte array containing session data.
  • offset
    Type: Int32
    Offset, in bytes, to the start of the data.
  • count
    Type: Int32
    Amount, in bytes, of data sent.
  • options
    Type: SendDataOptions
    Enumeration containing data send options.

Exceptions

Exception type Condition
ArgumentNullException data is null.
ArgumentOutOfRangeException
  • offset must be greater than zero, and no larger than the amount of data available.
  • count must be greater than zero, and offset + count must be no larger than the amount of data available.
ObjectDisposedException The NetworkGamer sending this message is no longer valid. The gamer may have left the session.

See Also

Tasks

Sending Network Data

Reference

LocalNetworkGamer Class
LocalNetworkGamer Members
Microsoft.Xna.Framework.Net Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP