bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UDPDuplex constructor fails on cygwin


From: James Cooper
Subject: UDPDuplex constructor fails on cygwin
Date: Tue, 04 Mar 2003 11:46:58 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

I used Makino Takaki's patch and compiled commoncpp2-1.0.8 on cygwin.
(Thanks Makino),
but the following program, which works on linux dumps core on cygwin when it tries to construct a UDPDuplex object. Sorry if this is a known problem.

#include <iostream>
#include <cc++/socket.h>

using namespace ost;

int main(int argc, char *argv[])
{
    int port = 4321;
    char thishost[256];

    gethostname(thishost,sizeof(thishost));

    cout << "creating UDPDuplex socket on host \"" << thishost << "\"";
    cout << " at port " << port << endl;
    InetAddress address(thishost);

    cout << "host name: " << address.getHostname()  << endl;

    cout << "Got address.  So far so good." << endl;
    UDPDuplex duplex(address, port);
    cout << "I want to see this message from cygwin." << endl;

    exit(0);
}


--
James Cooper                ,-_|\  E-mail: address@hidden
Curtin University          /     \ Phone:  +61 8 9266 2948
GPO Box U1987, PERTH       $_,-._/ Fax:    +61 8 9266 2819
WA 6845, Australia              v  CRICOS provider code: 00301J





reply via email to

[Prev in Thread] Current Thread [Next in Thread]