UNPKG

ftpd.js

Version:
128 lines (102 loc) 3.12 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: user/index.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: user/index.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>/** * * @access public * @constructor * @param {Interface} theInterface the interface the user connected through * @param {net.Socket} socket the socket the user is attached to * @since 0.6.0 */ function User( theInterface, socket ) { this.theInterface = theInterface; this.socket = socket; } /** * * This function is used to get the username of the user. * Please note that the username may not have been set when you request it as it's defined when the * user executes the "USER &lt;username>" command * * @access public * @returns {string} the username of the user if it's been defined * @since 0.6.0 */ User.prototype.getUsername = function () { return this.username; }; User.prototype.setUsername = function ( username, local ) { local = local || true; if ( local ) { this.username = username; return; } }; User.prototype.getPassword = function () { return this.password; }; /** * * This function is used to get the password of the user. * Please note that the password may not have been set when you request it as it's defined when the * user executes the "PASS &lt;username>" command * * @access public * @returns {string} the password of the user if it's been defined * @since 0.6.0 */ User.prototype.setPassword = function ( password, local ) { local = local || true; if ( local ) { this.password = password; return; } }; /** * * @returns {Interface} the interface the user connected through */ User.prototype.getInterface = function () { return this.theInterface; }; /** * * This function is used to get the socket the user is attached to * * @access public * @returns {net.Socket} the socket the user is attached to */ User.prototype.getSocket = function () { return this.socket; }; module.exports = User;</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ftpdjs.html">ftpdjs</a></li><li><a href="Interface.html">Interface</a></li><li><a href="Server.html">Server</a></li><li><a href="User.html">User</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0-dev</a> on Wed May 27 2015 15:03:13 GMT+0200 (CEST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>