SF.net SVN: fclient: [43] trunk/fclient/fclient_lib/fcp/fcp2_0.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2007-11-04 17:31:25
|
Revision: 43
http://fclient.svn.sourceforge.net/fclient/?rev=43&view=rev
Author: jUrner
Date: 2007-11-04 09:31:30 -0800 (Sun, 04 Nov 2007)
Log Message:
-----------
some more consts
Modified Paths:
--------------
trunk/fclient/fclient_lib/fcp/fcp2_0.py
Modified: trunk/fclient/fclient_lib/fcp/fcp2_0.py
===================================================================
--- trunk/fclient/fclient_lib/fcp/fcp2_0.py 2007-11-04 17:29:50 UTC (rev 42)
+++ trunk/fclient/fclient_lib/fcp/fcp2_0.py 2007-11-04 17:31:30 UTC (rev 43)
@@ -121,10 +121,20 @@
Version = '2.0'
FcpTrue = 'true'
FcpFalse = 'false'
+ class ConnectReason:
+ Connect = '1'
+ Reconnect = '2'
+
+
class DisconnectReason:
- """Reason for client disconnect"""
+ """Reasons for client disconnect
+ @cvar Shutdown: regular shutdown of the connection
+ @cvar SocketDied: connection to the node died unexpectingly
+ @cvar ConnectFailed: connection could not be established
+ """
Shutdown = '1'
SocketDied = '2'
+ ConnectFailed = '3'
class Events(events.Events):
@@ -757,10 +767,16 @@
timeElapsed += timeout
time.sleep(timeout)
+ sef.events.ClientDisconnect({'DisconnectReason': DisconnectReason.ConectFailed})
self._log.info(self.LogMessages.ConnectingFailed)
raise StopIteration
+
+
+ def connectionName(self):
+ """Returns the connection name the client uses"""
+ return self._connectionName
-
+
def handleMessage(self, msg):
"""Handles a message from the freenet node
@param msg: (Message) to handle
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|