1

I've got an android server application and a client application on the same device. The 2 apps communicate through TCP connection . I would like to know on the server side the name of the connected application without sending the name due to restrictions I cannot change.

Would be glad to hear some suggestions.

Thanks

liorlis
  • 216
  • 3
  • 14

1 Answers1

1

TCP connection doesn't know the app name. This is just a (server) port which listens some byte data. If you send some information at first (some bites) the server will know what kind of app is used.

For instance, you can read this specification:

https://www.rfc-editor.org/rfc/rfc793#page-15

Community
  • 1
  • 1
Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
  • I know that TCP connection does not know the app name this is why i need another way to get it :) – liorlis Sep 08 '16 at 12:56