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++ » UppHub » Urr
Urr [message #23772] Fri, 20 November 2009 14:09 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I have added "UDP request-response" protocol/package.

If you are intersted, see UrrPingClient/UrrPingServer examples.
Re: Urr [message #23780 is a reply to message #23772] Sat, 21 November 2009 12:37 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Is this package cross-platform?
Re: Urr [message #23810 is a reply to message #23780] Mon, 23 November 2009 21:08 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

::up::
Re: Urr [message #23942 is a reply to message #23780] Wed, 09 December 2009 09:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sat, 21 November 2009 06:37

Is this package cross-platform?


Should be.
Re: Urr [message #24131 is a reply to message #23942] Sun, 27 December 2009 21:40 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

luzr wrote on Wed, 09 December 2009 10:29

Mindtraveller wrote on Sat, 21 November 2009 06:37

Is this package cross-platform?


Should be.

Nice example!
Thank you!

What you recommend to send massive data between two computers by internet?

regards, Ion (tojocky)
Re: Urr [message #24139 is a reply to message #24131] Mon, 28 December 2009 12:53 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi Tojoky,

UDP can be used safely between two computers in a LAN. If you plan to use it over internet a problem comes immediately to you:
UDP is allowed to lose packets (without you being noticed !)

There are two solutions:
1 - you can afford to lose some packets
2 - you have a dedicated control mechanism (as in TCP)

A second problem comes: it is not guaranteed that you will receive all the packets in original order ! ( although most of them will be in the wright order )



client adress in server available? [message #29601 is a reply to message #24139] Tue, 02 November 2010 20:57 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi mirek,

Urr is quite nice in terms of interface..
a quick feature request comes up in my case.
using UrrServer, i'd need the adress of the client, the packet came from..
is this possible for you to make available in Urr?
BUG: MinGW compile needs 'ws2_32' linking in Urr [message #29620 is a reply to message #29601] Thu, 04 November 2010 11:56 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi mirek

compiling /using Urr under TDMGCC / MINGW resulted in a linkage error, ws2_32 was missing..

i was brave enough to directly commit this small change for you..hope this is ok.
Re: client adress in server available? [message #29849 is a reply to message #29601] Mon, 22 November 2010 11:05 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
kohait00 wrote on Tue, 02 November 2010 20:57

hi mirek,

Urr is quite nice in terms of interface..
a quick feature request comes up in my case.
using UrrServer, i'd need the adress of the client, the packet came from..
is this possible for you to make available in Urr?


what about
Urr.h:83

	int SourcePort() const { sockaddr_in& srcadr = *(sockaddr_in*)&adr; return ntohs(srcadr.sin_port); }
	String SourceIp() const { sockaddr_in& srcadr = *(sockaddr_in*)&adr; return String(inet_ntoa(srcadr.sin_addr)); }



BTW: RELEASE compile warns about empty ';', this is bit ugly in clean compiles Smile
pls change to:
Urr.h:35
	if(bug == 0) { LOG("[Emulated drop]"); }

[Updated on: Mon, 22 November 2010 11:06]

Report message to a moderator

Re: Urr [message #30563 is a reply to message #24139] Sat, 08 January 2011 20:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Mon, 28 December 2009 06:53

Hi Tojoky,

UDP can be used safely between two computers in a LAN. If you plan to use it over internet a problem comes immediately to you:
UDP is allowed to lose packets (without you being noticed !)

There are two solutions:
1 - you can afford to lose some packets
2 - you have a dedicated control mechanism (as in TCP)

A second problem comes: it is not guaranteed that you will receive all the packets in original order ! ( although most of them will be in the wright order )



However, those are things that Urr solves...

Well, for very large amounts of data, TCP will be better. But if your usage scenario is about making a lot of quick requests and getting response that usually (not always!) is less than say 32KB, Urr shall be better - it takes quite long for TCP to establish connection, while for Urr request/response are just 2 packets.

If your response data too often >32KB, Urr still would work fine, but at some point TCP/IP would start to be better.
Re: client adress in server available? [message #30564 is a reply to message #29601] Sat, 08 January 2011 20:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 02 November 2010 15:57

hi mirek,

Urr is quite nice in terms of interface..
a quick feature request comes up in my case.
using UrrServer, i'd need the adress of the client, the packet came from..
is this possible for you to make available in Urr?


I have no problem adding this feature by you, this is bazaar after all Smile

However, I have to warn you about USING it for anything else than small projects in controlled environment. Too many devices in networks are performing NAT, so client address tends to be completely unreliable.
Re: client adress in server available? [message #32130 is a reply to message #30564] Tue, 26 April 2011 13:58 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
committed it with a warning...
Previous Topic: "Alternative Multithreading" revisited
Next Topic: Outlook automation with MAPIEx
Goto Forum:
  


Current Time: Fri Mar 29 11:55:31 CET 2024

Total time taken to generate the page: 0.01752 seconds