#What am I missing in my netty code

24 messages · Page 1 of 1 (latest)

vague widget
#

So I am trying to figure out what exactly is wrong with my code. I am trying to connect to a server and I wrote some code in java using netty. It does not work in java on my pc (not work as in, the connection gets refused). However, when I run it on my phone by just pasting the code in an android studio project it works completely fine. I think there is some kind of difference in the underlying socket connection / difference in the OS but I am not sure what exactly. Anyone who can help me figure it out perhaps?

tall ridgeBOT
#

This post has been reserved for your question.

Hey @vague widget! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

vague widget
#

I'll share when I am able to. I however doubt there's much to find in the code that is broken since the code is exactly the same in the android app and works fine

vague widget
#

How to share larger pieces of code?

#

I haven't provided some classes with it since they only contain simple things like username and password and such. Just data

true karma
vague widget
#

The host and port of the server

#

Android and Java both the same

true karma
#

where is server running

#

and also share stack trace of failed connection from pc

vague widget
#

Somewhere in the US. The connection does not fail. It just gets refused. As if it recognises that the connection is from java and not a phone or something

vague widget
#

Where can I find that?

true karma
#

when connection fails you would get some kind of error right?

vague widget
#

Ah like that. No, the connection itself succeeds. After that the server tells me that the connection is not allowed (for whatever reason) similar to a 403 I guess. This however does not happen when I run the exact same code on my phone? That is what I am trying to figure out

#

And that is why I suspect there might be an underlying difference between the two which I am not aware of

tall ridgeBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

vague widget
#

Beep

tall ridgeBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

vague widget
#

Reopen