1
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3
/* Copyright (C) 2007 The giomm Development Team
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free
17
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
#include <giomm/asyncresult.h>
22
#include "slot_async.h"
27
Glib::RefPtr<NetworkAddress>
28
NetworkAddress::parse(const std::string& host_and_port, guint16 default_port)
31
GNetworkAddress *address = G_NETWORK_ADDRESS
32
(g_network_address_parse (host_and_port.c_str (), default_port,
35
Glib::Error::throw_exception (error);
37
return Glib::wrap (address);