StreamingSocket bindToPort problem


#1

Hi, I'm trying to setup a TCP server on android with StreamingSocket and bindToPort, but no matter which port I choose (>1024) bindToPort always fails. I've the android.permission.INTERNET set.


#2

I don't know the answer, but I assume you've seen this: http://stackoverflow.com/questions/14077907/binding-tcp-port-fails-in-native-executable-android


#3

Thanks, I haven't! Interesting, I'll check see if that is the problem.


#4

Dammit. No, even if port is within the ephemeral range, bindToPort still returns false. 


#5

is the errno when checked directly after bindToPort. Ideas ?


#6

http://stackoverflow.com/questions/13832997/ruby-sockets-error-einval-while-trying-to-bind-a-sending-socket-to-a-port


#7

Ah. Scrap it all. I'm now using the IPC classes, works fine for my use case.