friend_send_lossy_packet


Description:

public bool friend_send_lossy_packet (uint32 friend_number, uint8[] data, out ErrFriendCustomPacket error = null)

Send a custom lossy packet to a friend.

The first byte of data must be in the range 200-254. Maximum length of a custom packet is MAX_CUSTOM_PACKET_SIZE.

Lossy packets behave like UDP packets, meaning they might never reach the other side or might arrive more than once (if someone is messing with the connection) or might arrive in the wrong order.

Unless latency is an issue, it is recommended that you use lossless custom packets instead.

Parameters:

friend_number

The friend number of the friend this lossy packet should be sent to.

data

A byte array containing the packet data.

Returns:

true on success.