> Trying to implement a simple client socket connection using the Poco::Net module. When I try to instanciate many of the classes, it trowls a "bad_alloc" in New.cpp. This happens if I try to create a IPAddress object or a SocketAddress object. Any ideas?
>
- Code: Select all
> string server("10.4.1.16");
> Poco::Net::IPAddress ipa(server);
>
> and
>
- Code: Select all
> SocketAddress addr(server, port);
>
> Both throw the same std::bad_alloc error.
This does not look like a Poco-related error. Please post more code and we may be able to help you. Alternatively, trace the execution of your code in debugger and see where does the exception originate (in which case you may not even need our help).
Also, when posting code, please enclose it in code tags like this:
- Code: Select all
[code] YourCodeHere ych;
[/code] Checking out the Preview before posting is highly recommended, too.
Alex