 pingInterval = 60000
 
 User = require './user.coffee'
+Message = require './message.coffee'
 
 class Client extends EventEmitter
     constructor: (@host, @group, @email, @password, @options={wssPort: 443}) ->

        @self = null
        @channels = {}
        @users = {}


        @ws = null
        @_messageID = 0

        else
            @logger.error 'Failed to load profiles from server.'
            @emit 'error', { msg: 'failed to load profiles'}
    
    _onChannels: (data, headers) =>
        if data
            @channels = data.members
            @logger.debug 'Found '+Object.keys(@channels).length+' channels.'
            @channel_details = data.channels
        else
            @logger.error 'Failed to get subscribed channels list from server.'
            @emit 'error', { msg: 'failed to get channel list'}

    connect: ->
        @logger.info 'Connecting...'
