public static bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error)
{
if (buffer != null)
{
if (buffer.Length < size)
{
throw new ArgumentOutOfRangeException(string.Concat(new object[]
{
"Size: ",
size,
" > buffer.Length ",
buffer.Length
}));
}
if (size == 0)
{
throw new ArgumentOutOfRangeException("Size is zero while buffer exists, please pass null and 0 as buffer and size parameters");
}
}
if (buffer == null)
{
return(NetworkTransport.StartBroadcastDiscoveryWithoutData(hostId, broadcastPort, key, version, subversion, timeout, out error));
}
return(NetworkTransport.StartBroadcastDiscoveryWithData(hostId, broadcastPort, key, version, subversion, buffer, size, timeout, out error));
}