FTP | CCD | Buscar | Trucos | Trabajo | Foros |
#1
|
|||
|
|||
Sockets
Hola a todos,
Tengo una aplicacion cliente servidor hecha con sockets, envio mensajes del servidor a los clientes, el servidor no siempre está conectado solo cuando abro sesion en windows 2003 y lo ejecuto, los clientes verifican si el servidor está conectado cada cierto tiempo y si el servidor se está ejecutando se conectan, esto lo hago con un timer que intenta cada cierto tiempo activar el Client Socket, si se conecta detengo el timer y ya no se activa hasta que el servidor se desconecta o alguien mata el proceso del servidor, es decir on disconnect y en error connect, en este momento es cuando vuelvo a activar el timer, funciona bien pero despues de que los clientes no se pueden conectar por un largo tiempo me sale varias instancias del siguiente error: Alguna opinión de este error. Muchas gracias de antemano. Un Saludo Jorge |
#2
|
||||
|
||||
A primera mano te puedo de decir que quizas estas malversando memoria, es decir no estas liberando o quizas estas haciendo un mal uso de ella.
Por lo que comentas puede que el error vaya por los Timer que usas, en todo caso solo estoy especulando por que sin ver código no se te puede ayudar.. Saludos...
__________________
"Pedid, y se os dará; buscad, y hallaréis; llamad, y se os abrirá." Mt.7:7
|
#3
|
|||
|
|||
Socket Error
Hola compañero,
Este es el codigo:
Última edición por rgstuamigo fecha: 14-06-2010 a las 20:31:39. Razón: Estética en el código |
#4
|
||||
|
||||
Bueno no he revisado demasiado tú código pero para ir al grano por que no tratas de poner algunos puntos de ruturas(Break point) en las instruciones que sospeches que son la causante del error.. En otras palabras por que no debugeas(Debug) tu aplicacion..
Saludos...
__________________
"Pedid, y se os dará; buscad, y hallaréis; llamad, y se os abrirá." Mt.7:7
|
#5
|
|||
|
|||
Socket error
Es que el fallo no me lo da en tiempo de compilación y tampoco me lo da siempre, es cuando está sin conectarse durante 12 horas o más aproximadamente. He cambiado el puerto de conexion a uno más bajo y he aumentado el tiempo del timer, pero no sé si funcionará. Lo que me vendria bien es limpiar el buffer del socket cada cierto tiempo, sabes como podria hacerlo.
Gracias un saludo |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Uso de sockets | vejerf | Internet | 3 | 15-11-2007 21:44:16 |
Sockets | Caral | Varios | 4 | 29-08-2006 22:29:39 |
ADO y Sockets | krilea | Conexión con bases de datos | 3 | 21-04-2005 22:38:55 |
Sockets con DB | Slash | Internet | 1 | 08-07-2004 19:58:18 |
sockets | the darkness | Internet | 7 | 28-04-2004 18:56:13 |
|