Accommodation of sockets on BB10 (server) does not work. Advice?

I saw a server FTP application in the app store, so I tried it. It hosts an open port that I can connect to with my FTP client, which is great. However, when my own application (which is an application of indigenous waterfalls) try to host an open port, I can't connect to it. I get a "connection refused" on the client. During my connection attempts, my request (which was accepting connections and being debugged) do not unlock the State listen to because it never received the connection. This situation is evident, even I'm debugging or just run the application launch manually.

I can only conclude that there is a firewall any on the device that blocks incoming connections (and so, accommodation sockets). Or routing Sockets open is disabled somehow.

My question is: why android applications are allowed to host a srever socket while the applications of stunts are not? And above all, y at - it a solution?

EDIT: I enabled permission to acccess_internet.

Hello

I just created a test project and I can confirm that QTcpServer works using WiFi on Dev Alpha A:

Newspapers of the device:

15:58:04.371 may 08 server started

15:58:55.953 may 08 new connection

$ telnet 192.168.0.33 5335
192.168.0.33 by train...
Connected to 192.168.0.33.
[Escape character is ' ^]'.

This part of the code is not necessary. It blocks the event loop and the slot is not called:

while ( _server.isListening() ) // Server constantly waits
    {
        // If a new connection is available, onNewConnection() will be triggered
        _server.waitForNewConnection( -1 );
    }

Here is my code:

TestProj.hpp

#ifndef TestProj_HPP_
#define TestProj_HPP_

#include 
#include 

namespace bb { namespace cascades { class Application; }}

class TestProj : public QObject
{
    Q_OBJECT
public:
    TestProj(bb::cascades::Application *app);
    virtual ~TestProj() {}

protected slots:
    void onNewConnection();

protected:
    QTcpServer *tcpServer_;
};

#endif /* TestProj_HPP_ */

TestProj.cpp:

#include "TestProj.hpp"

#include 
#include 
#include 

using namespace bb::cascades;

TestProj::TestProj(bb::cascades::Application *app)
: QObject(app)
{
    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);

    AbstractPane *root = qml->createRootObject();
    app->setScene(root);

    tcpServer_ = new QTcpServer(this);
    QObject::connect(tcpServer_, SIGNAL(newConnection()), this, SLOT(onNewConnection()));

    if (!tcpServer_->listen(QHostAddress::Any, 5335))
    {
        qDebug() << "Unable to start the server:" << tcpServer_->errorString();
    }
    else
    {
        qDebug() << "Server started";
    }
}

void TestProj::onNewConnection()
{
    qDebug() << "New connection";
}

Tags: BlackBerry Developers

Similar Questions

  • BB10 sim does not work in VM Player 5

    Message says it all really everyone has work?

    For me the mouse appears and can be moved but empty apart from this screen.

    With the help of Windows 8 so relevant.

    Hello

    According to the post MSom problem is known and BB10 sim does not currently work on VM player 5.

    The ticket URL: http://supportforums.blackberry.com/t5/Native-Development/Warning-Simulators-fail-to-boot-in-VMWare-...

  • VMWare Update Manager Server does not work after changing name of host/IP

    I have Virtual Center 2.5 update 4 and Manager Update on two separate servers.

    I had to rename and change the IP of the Server Manager to update, and now the Server Update Manager does not work.

    Here are two mistakes that I get, when you try to activate the plugin Update Manager:

    "The server took too long to respond" or "VMWare Update manager cannot accept applications because VirtualCenter.

    Server is not reachable, or it's the database is not reachable

    by train to stop'

    That's what I did to change the host name:

    -J' uninstalled virtual UpdateManager 1.0 Clients Center customer.

    -I stopped the Service VMware Update Manager on the update server

    -J' I renamed the update server changed its IP address and the host name and then rebooted the server (without starting the VMware Update Manager Service)

    -J' changed the value of the fields

    dbo. VPX_EXT_CLIENT. URL

    dbo. VPX_EXT_SERVER.UR

    -in the vCenter (on the vCenter server) database reflecting the new name of the server (the new hostnameis to pings to the vCenter server)

    -J' restarted the vCenter Server

    -J' started the Service VMware Update Manager on the update server

    -J' installed the client plugin update manager Virtual Infrastructure client

    -J' have TRIED to activate the plugin, but I got a warning about an untrusted certificate (I guess it happened also when I installed the client for the first time, and everything worked) and then I got two errors:

    sometimes "the server has taken too much time to react" and a few other times "the VMWare Update manager cannot accept applications because VirtualCenter.

    Server is not reachable, or it's the database is not reachable

    by train to stop'

    I think that there are a few other references to the host name of the Update Manager, which I have not changed, on the vCenter server or Manager Update server...

    Does anyone have an idea what do I do?

    Thank you in advance.

    I would try just reinstalling the update on existing installation manager.  Do not overwrite the database in the process so that you shouldn't really lose anything.  Not the plugin, but since the Update Manager vCenter installation media.

    Give that a try and let us know how it goes.

  • The virtual DHCP server does not work why?

    Hello

    I used the workstation to create a virtual machine with NAT connection. The virtual machine works well in my computer with WiFi, and it can get an IP address from the virtual DHCP server successfully. Then I copied it on another computer with no network connection (no wifi, no cable connection). After startup, the virtual machine cannot obtain an IP address from the DHCP server. In my opinion, if she has a physical or network connection, the DHCP server should work anywhere. I wonder why the server may not work.

    Also, is there any document to introduce inside the vmware network. Thank you!

    Yes, NAT is the network setting that allow you to generate ip which is pre defined in the virtual network Editor. and your virtual machine will also communicate to the outside network.

    On the contrary if you change host Only.The vm will get the ip address range but they will communicate within your host not the outside world. If no internet connection then. (No network connectivity don't require in this case)

  • Problem loading of LabVIEW examples: "an error has occurred - system OR Web server does not work."

    On one of my computers, whenever I try to load any LabVIEW example, it does not load and I get this message. It works on other computers.

    How do I tell me what's not on the computers?

    OK I get it; the trick is to learn how to do a search of this forum with the right combination of magic words, and it may take a few tries. It seems the least better words. The words magical combination "OR Web Server system" showed me to go to the Panel > programs and repair LabVIEW; problem solved.

  • Why my cron for primary/secondary server does not work, but worked at the prompt of

    I have redhat linux version 5, oracle servers 11 GR 2.

    I have cronjobs to monitor the use of tablespace and alert logs.

    However they do not work to the task, but if I execute them at the command prompt, it worked.

    What could be the problem?
    example cron script:
    Head of the script:

    #! / bin/bash
    . / u01/app/Oracle/bin/hydev_env
    MAILTO = "DBA.com"
    LOG=/U01/app/Oracle/dba_cron/out/tablespace_90_full.html
    echo $ORACLE_SID
    sqlplus-s < <-EOF > > / dev/null
    / as sysdba


    Cron job set is like this:


    #------------------------TABLESPACES Check------------------------------------------------------------------------
    0.35 * /u01/app/oracle/dba_cron/scripts/tablespaces_over_90%.sh > /u01/app/oracle/dba_cron/out/tablespaces_over_90%.log > 2 > & 1


    VI/var/spool/mail/oracle:

    At the error like this:
    / bin/sh:-c: line 0: about syntax error unexpected token '2'
    / bin/sh:-c: line 0: ' /u01/app/oracle/dba_cron/scripts/chk_ora_alert_all.sh > /u01/app/oracle/dba_cron/out/chk_oracle_alert_all.log > 2 > & 1'


    Any help guru?

    Hello;

    Usually it is a question of the environment.

    The script works in command prompt, because when you signed on your chosen username environment of a profile settings, for example .bash_profile.

    A crontab task presents no environment. That's why you call hydev_env at the beginning of the script. If something things are missing in your env file especially likely.

    What I do is keep a file for each database in the environment to a place like this:

    / u01/app/Oracle/dba_tool/env (/ u01/app/oracle/dba_tool/env/PRIMARY.env)

    The PRIMARY.env file is .env

    What I keep in there, that's all I need a job like crontab background would need:

    ORACLE_BASE=/u01/app/oracle
    
    ULIMIT=unlimited
    
    ORACLE_SID=PRIMARY
    
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0.2
    
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    
    LIBPATH=$LD_LIBRARY_PATH:/usr/lib
    
    TNS_ADMIN=$ORACLE_HOME/network/admin
    
    PATH=$ORACLE_HOME/bin:$ORACLE_BASE/dba_tool/bin:/bin:/usr/bin:/usr/ccs/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/lbin:/GNU/bin/make:/u01/app/oracle/dba_tool/bin:/home/oracle/utils/SCRIPTS:/usr/local/bin:.
    
    export TERM=vt100
    
    export ORACLE_BASE ORACLE_SID ORACLE_TERM ULIMIT
    
    export ORACLE_HOME
    
    export LIBPATH LD_LIBRARY_PATH ORA_NLS33
    
    export TNS_ADMIN
    
    export PATH
    
    export MAILTO=
    

    Important If you are not sure, a setting on your system type "env" at a Linux prompt, when you are logged in as user where the script works. Change as needed in your file .env.

    I have here a script call in crontab to check the tablespaces

    #!/bin/bash
    ####################################################################
    #
    
    if [ "$1" ]
    then DBNAME=$1
    else
    echo "basename $0 : Syntax error : use . quickcheck  "
    exit 1
    fi
    
    #
    # Set the Environmental variable for the instance
    #
    . /u01/app/oracle/dba_tool/env/${DBNAME}.env
    #
    #
    
    $ORACLE_HOME/bin/sqlplus /nolog <
    

    Note how I passes the name of the comic as a parameter to the script if I can use the script with several database without changing.

    /U01/app/Oracle/dba_tool/bin/quickCheck.sh primary SCHOOL

    Is the crontab to run every day at 05:12:

    12 05 * /u01/app/oracle/dba_tool/bin/quickcheck.sh PRIMARY > /tmp/quickcheck.out

    Best regards

    mseberg

  • My server does not work.

    I can't send or receive e-mails, either from my destop and phone. What can I do to fix this?

    Thunderbird doesn't have an app for smart phones, so looks like your email provider has a problem and not your Thunderbird software. Have you checked with them?

  • Since the Firmware update on 6.5.0. Plex App Server does not work

    I just updated my firmware 6.5.0 ReadyNAS and had to see that the Plex Media Server for RN2xx App no longer works. No updates for the App available as well. Anyone facing this problem or has a solution?

    Again, sorry, in the meantime it has worked very well, I had the patience to wait 5 Minutes after the restart, as it is said in the notice.

    Thank you!

  • 85.255.116.148 primary dns server does not work

    I am trying to view an email and it telling me I can't because of the server main dns 85.255.116.148 and it keeps failing how to fix this problem

    Hello

    How are you connected?  Do you have a router?

    What do you use to get/reviews by e-mail?

    Look at this thread, read the answer in the section starting with:

    "One of the most common problems associated with Windows Vista Update error 80244019 is DNSChanger Trojan."

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_other-windows_update/Windows-Update-error-x080244019/42bf67c9-b97d-435D-bfb3-a93f30e1e598

  • Why object shared side Server does not work for me?

    application.onPublish = function (client, p_stream)
    {
    myInfo var = SharedObject.get (p_stream.name);
    myInfo.setProperty ("live", true);

    }

    I put the sharedobject using the code above, now I can edit the video, but it is not defined (from the administration console, tab "shared object").

    Which may be a possible reason for this?

    Change your code below and see if it works (I mean, I do not say that it will work - I say just try - if it doesn't work - I'll look more into details)

    myInfo var;

    application.onPublish = function (client, p_stream)
    {
    myInfo = SharedObject.get (p_stream.name);
    myInfo.setProperty ("live", true);

    }

  • Report server does not work in version 10.1.2...

    Hi all


    For a long time I am trying to run the report forms [32 bit] Version 10.1.2.0.2 (Production) server without network (IP) configuration. But I did it. But
    his work very well with the IP address. Is it possible to run the report without IP address server? Help me thanks in advance.


    Sarah

    Install a "loopback adapter" on your PC

    FRM-41213: unable to connect to the report server

  • My password for the integrated on my HP OfficeJet 8100 Web server does not work

    I entered my password, and kept the username by default (admin), but now I can't access the pages of EWS (locked).  How can I reset EWS (or the full printer) to the factory settings?

    Maybe my password is too long?  (20 characters)

    Thank you!

    Hello

    Please, make sure that you type the user as administrator when you type the password, then check to see if that can help you.

    If the same persists, reset the network settings, which will also reset the administrator password:

    If necessary, print a Network Setup page to find the IP address if it has changed, which can be done by pressing a second time the summary and the button wireless on the printer control panel.

    Kind regards

    Shlomi

  • I put Windows 7 on Windows 10 and Photoshop CS wants to turn back me and get and the Adobe authorization code.  The online server does not work and the provided phone number is out of service.  How can I get this Adobe authorization code?

    How can I get the authorization code of Adobe for re - activate Photoshop CS?  It worked fine until I updated Windows 7 Windows 10.

    The activation for Cs2 servers and more have been disabled by Adobe, and they offer a free download of CS2, which comes with a new serial number and doesn't require activation.

    There is no need to register your old software, follow the instructions in the link I gave you and download CS2. The series number is next to the download.

  • spool server says error signature does not work, can't restart, can't reload printers, missing icon

    Personal computer running Windows XP with two printers, HP Laser jet 1020 and Lexmark X 2250 works very well yesterday. Today, print jobs are back with the error signature telling me that my spool server does not work.  I went and tried to restart my spooler, no go.  Icons for missing print/fax printers program and I can not reinstall the printers.  Same message arrives, spool server does not.  How can I fix it.  I ran the difficulty it program, produced works and still nothing.  Help please!

    Hi Wendy,.

    It comes down at the end of the previous instructoins, so it of nothing to do but to remove and reinstall the printer, then follow these instructions to do this:

    We will try to uninstall then reinstall the printer in a specific way:

    1. remove the printer from the PC.

    2 uninstall the printer from the PC driver.

    3 reinstall the printer driver with the latest version of the Brother's Web site.

    4 reinstall the printer.

    Also, here are some references of printer:

    Open the printer Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter

    Why can I not print?

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-print

    Find and install printer drivers

    http://Windows.Microsoft.com/en-us/Windows7/find-and-install-printer-drivers

    Let us know.

    Best regards

    Matthew_Ha

  • Remote server in DW does not work

    Local view in DW works but the remote server does not work.

    A dialog box indicates that "an FTP error occurred cannot connect to the host. Please let me know how to understand it.

    You set your server settings remote instructions of your web host?

    Do you have your perform a connection TEST?  See screenshot.

    As Jon said, sometimes you will need to enable/disable the FTP mode passive power.

    Nancy O.

Maybe you are looking for