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

Sends a byte array to the specified gamer.

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

Syntax

public void SendData (
         byte[] data,
         SendDataOptions options,
         NetworkGamer recipient
)

Parameters

  • data
    Type: Byte
    Byte array containing session data.
  • options
    Type: SendDataOptions
    Enumeration containing data send options.
  • recipient
    Type: NetworkGamer
    Gamer to receive the data packet.

Exceptions

Exception type Condition
ArgumentException The NetworkGamer specified as the recipient does not belong to this network session.
ArgumentNullException data or recipient is null.
ObjectDisposedException The NetworkGamer specified as either the sender or the recipient 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