DCC Server Protocol

 

Chat Protocol

Client connects to Server and sends:

100 clientnickname

When Server receives this, it sends:

101 servernickname

Connection is established, users can now chat.

 

Fserve Protocol

Client connects to Server and sends:

110 clientnickname

When Server receives this, it sends:

111 servernickname

Connection is established, user can now access fserve.

 

Send Protocol

Client connects to Server and sends:

120 clientnickname filesize filename

When Server receives this, it sends:

121 servernickname resumeposition

Where resumeposition is between 0 and filesize, and is required.

Connection is established, and Server dcc gets the file.

 

Get Protocol

Client connects to Server and sends:

130 clientnickname filename

When Server receives this, it sends:

131 servernickname filesize

When Client receives this, it sends:

132 clientnickname resumeposition

Where resumeposition is between 0 and filesize, and is required.

Connection is established, and Server dcc sends the file.

 

Other

If server receives unexpected information, or does not receive info 15 seconds after initial connection, it closes the connection.

 

If service is unavailable, server sends:

150 unavailable

 

If server rejects connection, it sends:

151 rejected

 

Notes:

The Get protocol has been implemented in this way mainly because I am assuming:

 

 1) The client may not be able to open a socket to listen for and accept a connection (firewall etc.)

 

 2) The DCC Server may only be able to listen for connections on port 59 (firewall etc.)

 

 3) Since the client was able to connect to the DCC Server the first time, it should have no problem connecting to the same port again.

 

Currently the Get Protocol is only used by the Fileserver when a user who has connected to a Fileserver via the DCC Server requests a "get filename". All other attempts to Get a file via the DCC Server are ignored.