using namespace System; using namespace System::Net; using namespace System::Net::Sockets; void UDPinit(void){ Socket ^udpSvr=gcnew Socket( AddressFamily::InterNetwork,SocketType::Dgram,ProtocolType::Udp); IPEndPoint ^localIp=gcnew IPEndPoint(IPAddress::Parse("127.0.0.1"),8000); udpSvr->Bind(localIp); }
hello forum
I want define the above UDP object globally
and then call udpSvr->Send( ... ) from another point inside my code
how can I do this ?
thank you