Re: Engaging apps folks
Erik Nordmark <[email protected]>
| Newsgroups | gmane.ietf.multi6 |
|---|---|
| Message-ID | <[email protected]> |
> A network application developer actually only wants this: > 8<--------- > char uri[] = "tcp://hostname:service"; > sock = uriconnect(uri); > -------->8 > > A function similar like that should be abstracted by the networking > API's. getaddrinfo() requires a loop, weird cases etc, which you have to > duplicate in every application. The above would simply work(tm) and > doesn't require the application developer to worry about anything > networkish. The socket now presented by the API is for the application > the identifier and the only thing the API (or most probably the kernel) > would now have to do is make bloody sure that it keeps working, even if > it has to change underlying addresses etc. uriconnect() can abstract all > of that, the socket(), getaddrinfo() loop and the connect() call. The above is easy and with slight variations exist in different higher level abstractions to access the network. I don't know if all those abstractions do the retry loop though. But that doesn't address UDP, which would require a different structure of the API because only the application knows when to retry (e.g., based on the application layer not getting a response). Hence the retry can't be hidden under the API for UDP. Erik