Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

vc++ 2008 define global object - how ?

$
0
0
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


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>