public SendBroadcast ( byte data, int offset, int size, int port ) : bool | ||
data | byte | |
offset | int | |
size | int | |
port | int | |
Результат | bool |
public bool SendDiscoveryRequest(byte[] data, int start, int length, int port) { if (!IsRunning) { return(false); } var packet = NetPacket.CreateRawPacket(PacketProperty.DiscoveryRequest, data, start, length); return(_socket.SendBroadcast(packet, 0, packet.Length, port)); }
public bool SendDiscoveryRequest(byte[] data, int start, int length, int port) { if (!IsRunning) { return(false); } var packet = _netPacketPool.GetWithData(PacketProperty.DiscoveryRequest, data, start, length); bool result = _socket.SendBroadcast(packet.RawData, 0, packet.Size, port); _netPacketPool.Recycle(packet); return(result); }