William Rosenbloom
William Rosenbloom

Reputation: 2626

Can I use BSD sockets in Android NDK?

I thought I'd ask this here first because setting up anything with the NDK is such a pain. I know Android uses the Linux kernel but I know little of it's POSIX compliance as far as C libraries. Does the Android OS family implement the BSD socket API?

And if it does implement BSD sockets, am I allowed to simply implement a TCP/IP socket per AF_INET and SOCK_STREAM or must I do something else to account for cellular protocols like 4G?

Upvotes: 0

Views: 1091

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93614

Android is Linux. So yes, you can use normal sockets and Unix API calls. Where there's platform specific behavior, it should follow how Linux does things.

Upvotes: 2

Related Questions