Command=require'../../command'Protocol=require'../../protocol'classConnectCommandextendsCommand#Possiblereplies:#"unable to connect to 192.168.2.2:5555"#"connected to 192.168.2.2:5555"#"already connected to 192.168.2.2:5555"RE_OK=/connected to|already connected/execute:(host,port)->this._send"host:connect:#{host}:#{port}"@parser.readAscii4.then(reply)=>switchreplywhenProtocol.OKAY@parser.readValue().then(value)->ifRE_OK.testvalue"#{host}:#{port}"elsethrownewErrorvalue.toString()whenProtocol.FAIL@parser.readError()else@parser.unexpectedreply,'OKAY or FAIL'module.exports=ConnectCommand