Messages.cs
资源名称:FtpServer.rar [点击查看]
上传用户:xuelanruo
上传日期:2015-04-02
资源大小:163k
文件大小:3k
源码类别:
Ftp服务器
开发平台:
C#
- /*
- Ftp Dot Net Messages Files : contains the messages returned to the client.
- Copyright (C)
- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Last modification : 04/20/2004 by Simon FERQUEL
- */
- using System;
- namespace FtpServerLibrary
- {
- public class Messages
- {
- public static string MessReady()
- {
- return "220 FTP Server Readyrn";
- }
- public static string SignOff()
- {
- return "221 FTP Server Signing offrn";
- }
- public static string MessTooManyBadCmds()
- {
- return "421 Too many bad Commandsrn";
- }
- public static string CmdTimeOut()
- {
- return "500 Command Timeoutrn";
- }
- public static string UnknownError()
- {
- return "500 unkown errorrn";
- }
- public static string AlreadyAuth()
- {
- return "500 You are already authenticatedrn";
- }
- public static string UserButNotPass()
- {
- return "500 username is already specified, please specify passwordrn";
- }
- public static string EnterUser()
- {
- return "503 please specify username firstrn";
- }
- public static string SyntaxError()
- {
- return "500 Syntax errorrn";
- }
- public static string PassOk()
- {
- return "230 Password okrn";
- }
- public static string CwdOk()
- {
- return "250 CWD command successful.rn";
- }
- public static string DeleOk()
- {
- return "250 DELE command successful.rn";
- }
- public static string AuthFailed()
- {
- return "530 UserName or Password is incorrectrn";
- }
- public static string PassReq(string userName)
- {
- return "331 Password required for user : '" + userName + "rn";
- }
- public static string Pwd(string curdir)
- {
- return "257 "" + curdir + "" is current directory.rn";
- }
- public static string TypeSet(string type)
- {
- return "200 Type is set to " + type + ".rn";
- }
- public static string InvalidType(string type)
- {
- return "500 Invalid type : " + type + ".rn";
- }
- public static string AuthReq()
- {
- return "530 Please authenticate firstrn";
- }
- public static string PortCmdSuccess()
- {
- return "200 PORT Command successfulrn";
- }
- public static string DataOpen()
- {
- return "125 Data connection open, Transfer starting.rn";
- }
- public static string DataOpening()
- {
- return "150 Opening data connection.rn";
- }
- public static string DataConFailed()
- {
- return "425 Can't open data connection.rn";
- }
- public static string TrComplete()
- {
- return "226 Transfer Complete.rn";
- }
- public static string TrFailed()
- {
- return "426 Connection closed; transfer aborted.rn";
- }
- public static string AccesDenied()
- {
- return "550 Access denied or directory dosen't exist !rn";
- }
- public static string PasvCmdSuccess(string ip)
- {
- return "227 Entering Passive Mode (" + ip + ").rn";
- }
- }
- }