Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Developer
Posts: 105
Registered: ‎09-06-2013
My Device: Z10

[Noobie Question] Can I start an application that is simply a socket server without internet and another app connect to it?

As in title, but more clearly

 

Assuming im using device simulator, 

 

Assuming no wifi conection, (no internet)

 

I have one app which acts as socket server using qtcp and has permission to run as active frame

 

I have another app which is client which will talk to the server app <- will this succeed in connecting to the socket even without an internet connection in the server? 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: [Noobie Question] Can I start an application that is simply a socket server without internet and another app connect to it?

It should. You'd be binding to localhost, presumably, so as long as the client socket connects to that and the right port it will connect okay.

Note that you're restricted, as is pretty usual, to port numbers above 1023 since your app will lack permission to use anything below 1024.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 105
Registered: ‎09-06-2013
My Device: Z10

Re: [Noobie Question] Can I start an application that is simply a socket server without internet and another app connect to it?

If I have a desktop application and want to be able to sent files from device over to the desktop application, what should I use? I am new to all this, I think I need sockets but I have no idea if I need a server or anything on the desktop portion, assuming I just want to save any file that is received (from device) to the desktop storage

Developer
Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: [Noobie Question] Can I start an application that is simply a socket server without internet and another app connect to it?

Look here for inspirations

QTcpSocket videos + examples

 

http://www.voidrealms.com/index.php?r=tutorial/index&Tutorial%5BLanguageID%5D=3&Tutorial%5BName%5D=&...

 

Hope it helps



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog