Browse Source

added closeConnection.

Nicolas Cannasse 19 years ago
parent
commit
d55b38bf9a
1 changed files with 10 additions and 0 deletions
  1. 10 0
      std/haxe/remoting/SocketConnection.hx

+ 10 - 0
std/haxe/remoting/SocketConnection.hx

@@ -61,6 +61,16 @@ class SocketConnection extends AsyncConnection {
 		}
 	}
 
+	public function closeConnection() {
+		#if neko
+		var s : neko.net.Socket = __data;
+		try s.close() catch( e : Dynamic ) { };
+		#else true
+		var s : XMLSocket = __data;
+		s.close();
+		#end
+	}
+
 	static function decodeChar(c) {
 		// A...Z
 		if( c >= 65 && c <= 90 )