MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / UdpServerStart

Function UdpServerStart

source/udpcon.cpp:42–62  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

40}
41//---------------------------------------------------------------------------
42void 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//---------------------------------------------------------------------------
64void UdpServerStop(void)
65{

Callers 2

FormCreateMethod · 0.85
aSetupExecuteMethod · 0.85

Calls 6

PrintSBFunction · 0.85
WriteToLogErrorFunction · 0.85
ReportError2Function · 0.85
OpenMethod · 0.45
GetLocalAddrPortMethod · 0.45
GetErrorMessageEngMethod · 0.45

Tested by

no test coverage detected