[Help] IRC Disconnected after some time, using Winsock
Hello guys, I have a problem. I made a program which connects to IRC via Winsock. It connects correctly, but after some time it disconnects with message:
"Ping timeout: 121 Seconds"
Why this happens? It happens always.. something must be wrong.. any ideas? thanks.
Re: [Help] IRC Disconnected after some time, using Winsock
Google and RFCs1459 are you friends:
Quote:
Originally Posted by IRCProtocol RFC
4.6.2 Ping message
Command: PING
Parameters: <server1> [<server2>]
The PING message is used to test the presence of an active client at the other end of the connection. A PING message is sent at regular intervals if no other activity detected coming from a connection. If a connection fails to respond to a PING command within a set amount of time, that connection is closed.
Any client which receives a PING message must respond to <server1> (server which sent the PING message out) as quickly as possible with an appropriate PONG message to indicate it is still there and alive. Servers should not respond to PING commands but rely on PINGs from the other end of the connection to indicate the connection is alive. If the <server2> parameter is specified, the PING message gets forwarded there.
4.6.3 Pong message
Command: PONG
Parameters: <daemon> [<daemon2>]
PONG message is a reply to ping message. If parameter <daemon2> is given this message must be forwarded to given daemon. The <daemon> parameter is the name of the daemon who has responded to PING message and generated this message.
Numeric Replies:
ERR_NOORIGIN ERR_NOSUCHSERVER