next up previous contents index
Next: Ping and Pong optimizations Up: Protocol messages Previous: Push message   Contents   Index

Bye message, version 0.6

The Bye message was introduced in the Gnutella 0.6 draft and is used to inform the servent, or servents, a node is connected to that the node is closing the connection. Since implementing this message is optional a special header must be sent during the connection handshake.

Bye-Packet: 0.1

Servents must not send Bye messages to hosts that has not indicated that they support this message. The TTL field in a Bye message must be set to 1 to avoid accidental propagation.

Upon receiving a Bye message a servent closes the connection in question immediately. The servent sending the message must wait a few seconds for the remote servent to close the connection before closing it. No data may be sent after the Bye message. The Bye message has the fields shown in table tbl:gnutellabye.


Table 3.9: Gnutella Bye message fields
Bytes Description
0-1 Code (as classified by SMTP)
2- Description string, null terminated



The code stored in the first two bytes correspond to return codes specified by SMTP (Simple Mail Transfer Protocol, [SMT01]). For example 200 means that everything is ok and 502 means that the send queue became full. For details on the semantics of individual codes see [Gnu02].


next up previous contents index
Next: Ping and Pong optimizations Up: Protocol messages Previous: Push message   Contents   Index
Marcus Bergner 2003-06-10