TCP socket not stable
From: Juan Antonio Giménez (jgimenez_at_siam.es)
Date: 07/20/05
- Next message: Kasper Dupont: "Re: TCP socket not stable"
- Previous message: Kasper Dupont: "Re: How to use system call in LKM on IA64"
- Next in thread: Kasper Dupont: "Re: TCP socket not stable"
- Reply: Kasper Dupont: "Re: TCP socket not stable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 20 Jul 2005 11:32:19 GMT
Hi hackers.
I've a thread that manage a TCP socket continously accepting new conecctions
when a client try to connect to my PC. The code is:
bind(SocketServer, (struct sockaddr *)&server_address, server_len);
listen(SocketServer, 10);
while(1) {
client_len=sizeof(client_address);
client_sockfd=accept(SocketServer,(struct sockaddr*)&client_address,
(socklen_t*)(&client_len));
if (client_sockfd!=-1) {
......
}
}
This code is working correctly but when 15000 seconds aprox don't accept
any client and the access to any file text
return error.
Someone know what's the problem.
Thanks.
- Next message: Kasper Dupont: "Re: TCP socket not stable"
- Previous message: Kasper Dupont: "Re: How to use system call in LKM on IA64"
- Next in thread: Kasper Dupont: "Re: TCP socket not stable"
- Reply: Kasper Dupont: "Re: TCP socket not stable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|