Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Udp class (UdpClient/UdpServer)
Udp class (UdpClient/UdpServer) [message #44059] Sat, 20 December 2014 09:28
omari is currently offline  omari
Messages: 266
Registered: March 2010
Experienced Member
Hello,

usage examples:

UdpClient:

UdpClient c("localhost", 4000);
String r = c.Send("Hello").Receive();



UdpServer:
void Listen1(UdpPeer& peer)
{
	String request = peer.Get();
	peer.Send("Thanks");

	if(finish)peer.StopServer();
}

CONSOLE_APP_MAIN
{
	UdpSrver srv;
	srv.Listen(4000, Listen1);
	
	while(srv1.IsRunning()) Sleep(1000);
}


update : bug fix.

Thanks
  • Attachment: Udp.7z
    (Size: 2.89KB, Downloaded 187 times)


regards
omari.

[Updated on: Sat, 18 March 2017 17:19]

Report message to a moderator

Previous Topic: Is Rainbow/FrameBuffer/XXXXFB broken?
Next Topic: CbGen not compiling in linux.
Goto Forum:
  


Current Time: Sun Jul 14 07:06:32 CEST 2024

Total time taken to generate the page: 0.00989 seconds