Página principal | Lista de componentes | Directories | Lista de archivos | Miembros de las clases | Archivos de los miembros | Páginas relacionadas

socket.h

Ir a la documentación de este archivo.
00001 /* 
00002  * LabSession - login application and administration tools 
00003  * Copyright (C) 2005 - 2006 - Hugo Ruscitti (see AUTHORS file)
00004  * 
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00018  */
00019 
00025 #ifndef _SOCKET_H_
00026 #define _SOCKET_H_
00027 
00028 #include <gnet.h>
00029 
00033 enum socket_mensaje {\
00034         MSG_NULL,               
00035         MSG_OK,                 
00036         MSG_ERROR,              
00037         MSG_LOGIN,              
00038         MSG_LOGOUT,             
00039         MSG_REINICIAR,          
00040         MSG_APAGAR,             
00041         MSG_GETDATOS,           
00042         MSG_DATOS,              
00043         MSG_MENSAJE,            
00044         MSG_USUARIO,            
00045         MSG_SESION,             
00046         MSG_ACTUALIZAR,         
00047         MSG_ACTUALIZA_SESION,   
00048         MSG_SUPER_SESION        
00049 };
00050 
00051 GIOChannel * socket_obtener_io (GTcpSocket * socket);
00052 GTcpSocket * socket_conectar (const char * ip, int puerto);
00053 int socket_recibir (GIOChannel * io, char * cadena, int * n);
00054 int socket_enviar (GIOChannel * io, char * cadena);
00055 int socket_enviar_tipo_mensaje (GIOChannel * io, enum socket_mensaje mensaje);
00056 int socket_enviar_mensaje (GIOChannel * io, enum socket_mensaje mensaje, \
00057                 int n, char * format, ...);
00058 enum socket_mensaje socket_leer_tipo_mensaje (GIOChannel * io);
00059 void socket_cerrar (GTcpSocket * socket);
00060 
00061 #endif




Generado con Doxygen, versión 1.4.2