Comments (3)
I deleted my earlier comments. Sorry. I responded to the wrong issue
from socket2.
As far as I know socket2 works on Android. Consider it returns a PermissionDenied
error the code works, but you don't have permission. Looking at https://stackoverflow.com/questions/6778103/a-simple-socket-app-in-android-needs-some-special-permissions-to-connect-through, I think your app needs the INTERNET
permission to work.
However Android development is out of scope for this issue tracking, you might be better of searching stackoverflow or similar for android network programming.
from socket2.
Sockets work on android. The standard library's TcpStream works just fine. Even socket2 Socket works just fine. However, the code I posted in this issue doesn't work. So the issue isn't with sockets on android. I think it's more to do with how datalink channel was implemented.
The code you post is fine, nothing wrong with it.
I also added the Internet permission by the way
Did this solve the issue?
I wouldn't consider this issue completed. You can go ahead and try out a simple socket implementation and then try out the example in the examples folder. You'd realise the issue I'm facing
I'm not an Android dev, so I'm not going to do that as I don't have an environment set up for it, or an Android phone for that matter.
If you still think this is an issue with socket2 I'm willing to reopen it, but I'll need some more information.
from socket2.
Related Issues (20)
- Socket::bind_device missing on linux platforms HOT 9
- Don't set CLOEXEC on Fuchsia HOT 2
- Add support for ancillary data receiving HOT 3
- Add SO_REUSEPORT support, currently only set_reuse_address. HOT 1
- Support `sockatmark()`-like functionality HOT 5
- support target ohos HOT 3
- Add CI support for ESP-IDF
- msghdr as a private field in MsgHdr/MsgMutHdr HOT 2
- Set Socket interface using interface index HOT 1
- What happened to the `RAW` socket type? HOT 1
- Question: Possible to support architectures that only provide the `std::net` interface (and only TCP)? HOT 4
- Windows: `sa_family_t` should use `ADDRESS_FAMILY` from `windows-sys` HOT 5
- nonblocking connect HOT 6
- Set `ss_len` when creating `SockAddr` from std HOT 1
- Why cannot find WASStartup and WSACleanup in source code? HOT 7
- bind_device succeeds, but subsequent sends fail with no such device or address. HOT 5
- QUESTION: How to special `laddr` when dialing connection? HOT 3
- don'tassign8080 port
- Currently socket2 has no way to set the DF bit on packets. The attached patch adds it. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socket2.