---------------------------------------------------------------------------
| 40 | } |
| 41 | //--------------------------------------------------------------------------- |
| 42 | void UdpServerStart(void) |
| 43 | { |
| 44 | if( ! MainCfg.UdpEnable ) |
| 45 | { |
| 46 | PrintSB(0, "UDP: server disabled"); |
| 47 | return; |
| 48 | } |
| 49 | |
| 50 | if( udp->Open(MainCfg.UdpInterface.c_str(), MainCfg.UdpPort, "0.0.0.0", 0) ) |
| 51 | { |
| 52 | PrintSB(0, String("UDP ") + udp->GetLocalAddrPort()); |
| 53 | } |
| 54 | else |
| 55 | { |
| 56 | PrintSB(0, "UDP: server not started"); |
| 57 | String err = String("Error udp: ") + udp->GetErrorMessageEng() + |
| 58 | " [udp port " + IntToStr(MainCfg.UdpPort) + "]"; |
| 59 | WriteToLogError(String("ERROR\t") + err); |
| 60 | ReportError2(err); |
| 61 | } |
| 62 | } |
| 63 | //--------------------------------------------------------------------------- |
| 64 | void UdpServerStop(void) |
| 65 | { |
no test coverage detected