OSX RawSocket constructor I/O error exception

Please post support and help requests here.
anskornyakov
Posts: 1
Joined: 24 May 2016, 14:24

OSX RawSocket constructor I/O error exception

Postby anskornyakov » 24 May 2016, 14:30

Hello,

I'm trying to implement some client-server service using Poco library and raw sockets provided.
I'm trying to create unconnected raw socket without binding, connecting etc.

Code: Select all

int main() {
    try {
        Poco::Net::RawSocket socket;
    } catch(const Poco::Exception& ex) {
        std::cerr << "Exception: " << ex.displayText() << ", code: " << ex.code() << std::endl;
    }

    return 0;
}


RawSocket constructor throws IOException with code 1 (and no message unfortunately). I've got OSX El Captain 10.11.3. What am I doing wrong? What could be a reason of an issue? Thanks.

Best regards,
Anton

alex
Posts: 1375
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: OSX RawSocket constructor I/O error exception

Postby alex » 24 May 2016, 20:46

try to run it as root. it should work.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 2 guests

cron