ARMmbed / sockets

mbed sockets library abstraction layer
Other
6 stars 18 forks source link

Use the SAL’s new inet_ntop and inet_pton functions #43

Closed bremoran closed 8 years ago

bremoran commented 8 years ago
bremoran commented 8 years ago

cc @bogdanm @niklas-arm @0xc0170 @adbridge

0xc0170 commented 8 years ago

Looks good to me.

This reminds me that we should document SocketAddr API

niklarm commented 8 years ago

Please update this with the header documentation from #39 !

niklarm commented 8 years ago

Would you like to add convenience functions like these? They make it a little safer to work with this API.

template< size_t N >
inline int fmtIPv4(char (&buf)[N]) {
    return fmtIPv4(buf, N);
}
bremoran commented 8 years ago

What do I do with the license for this?

I think it would be advisable to take care of the concern that @adbridge brought up above. The switch should not happen twice. It would be better to modify inet_pton to do the right thing.

bremoran commented 8 years ago

@niklas-arm said +1 in a separate message. I'm merging this so that other PRs can progress.