/*************************************************************************** * Copyright (C) 2006 by Gerd v. Egidy * * gve@intra2net.com * * * * This library is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License version * * 2.1 as published by the Free Software Foundation. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "socket_server.hxx" namespace libt2n { socket_server::socket_server(int port, const char* ip) : server() { type=tcp; } socket_server::socket_server(const char* path, mode_t chmod, const char* user, const char* group) : server() { type=unix; unix_path=path; struct sockaddr_un unix_name; /* Create the socket. */ socket = socket (PF_UNIX, SOCK_STREAM, 0); if (socket < 0) { string err="error opening socket: "; err+=::strerror(errno); // throw EXCEPTION(network_server_error,err); } } socket_server::~socket_server() { close(socket); if (type==unix) unlink(unix_path.c_str()); } void socket_server::fill_buffer(long long usec_timeout) { } socket_connection::socket_connection(int _socket, int _timeout) : connection(_timeout) { } void socket_connection::close() { } void socket_connection::fill_buffer(void) { } void socket_connection::write(const std::string& data) { } }