partial.js logo
Latest version
v1.3.1 (RC2)

FrameworkWebSocketClient

Properties


client.get {Object}client.id {String}client.ip {String}client.isClosed {Boolean}client.protocol {String Array}client.req {Object}client.session {Object}client.socket {net.Socket}client.uri {URI}client.user {Object}
client.get;
readonly
return Object;

Parsed data from URL params.

client.id;
important
return String;

ID of connection / client. You can change this id by yourself.

client.ip;
readonly
return String;

Current IP address.

client.isClosed;
readonly
return Boolean;

Is connection closed?

client.protocol;
readonly
return String Array;

Current protocol.

client.req;
readonly
return Object;

HTTP request.

client.session;Default: null
return Object;

Current custom session object.

client.socket;
readonly
return net.Socket;

node.js net.Socket

client.uri;
readonly
return URI;

Current URI address.

client.user;Default: null
return Object;

Current custom user object.

Methods


client.close()client.cookie(name)client.send(message)
client.close();
important
return FrameworkWebSocketClient;

Close connection.

client.cookie(name);Default: ''
return String;

Get cookie.

client.send(message);
important
return FrameworkWebSocketClient;

Send message via websocket to client.