Exemplo n.º 1
0
 /// <summary>
 /// Tunes the ReliableUdp inner settings such as approved size of packet and size of transmitting window.
 /// </summary>
 /// <param name="sizeOfPacket">Size of transmission packet.</param>
 /// <param name="transmittingWindowSize">Size of transmitting window</param>
 /// <param name="shortTimerPeriod">Timer interval before retransmission request</param>
 /// <param name="longTimerPeriod">Timer interval before release of resources in case of probable interrupted transmitting</param>
 /// <returns><c>true</c> if settings have successfully applied. <c>false</c> returns because of listener is already running</returns>
 /// <remarks>Default size of packet is 1456, which means that on most widly-spread Ethernet and Wi-Fi
 /// adapters it will use maximum packet size without ip fragmentation. ReliableUdp doesn't use
 /// MTU path technologies to find the best packet size between peers. If you have troubles with
 /// IP fragmentation in your network, decrease the sizeOfPacket on all estimated peers.
 /// </remarks>
 /// <exception cref="ReliableUdpConfigurationException"><paramref name="sizeOfPacket"/> must be between 496 and 1456 bytes.
 /// Or <paramref name="transmittingWindowSize"/>is less than 1.
 /// Or timer interval settings is incorrect</exception>
 public bool InitSettings(int sizeOfPacket, int transmittingWindowSize, int shortTimerPeriod = 5800, int longTimerPeriod = 30000)
 {
     return(m_tcb.InitSettings(sizeOfPacket, transmittingWindowSize, shortTimerPeriod, longTimerPeriod));
 }