Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing chat module by using Nowjs #213

Closed
lavinachitara opened this issue Dec 28, 2012 · 6 comments
Closed

Implementing chat module by using Nowjs #213

lavinachitara opened this issue Dec 28, 2012 · 6 comments

Comments

@lavinachitara
Copy link

I am implementing chat module by using nowjs but its site is not working. I am not able to see its documents and all syntax.

Will you please suggest me that is It ok for going nowjs for implementing chat ?

If yes then how can I download its guide and full of syntax list to use in my module.

@adamthedeveloper
Copy link

Check out firebase.com - They even have an example chat application and they offer a free version up to 500 megs.

@lavinachitara
Copy link
Author

But I have already started my module in Nowjs and now I am in a big stuff where I wanna call client side function in server side to show some output data on client side. If I tested on browser it will hit my client side but when I call it by mobile app it did not hit that function.

Can somebody help to sort out this issue.

@ghost
Copy link

ghost commented Dec 28, 2012

I have emailed the contact address to see if they are dropping support on the project or if they know of anyone that is picking it up from there. I will try to notify others of what I find out if anything.

On Dec 28, 2012, at 12:40 AM, "lavinachitara" <notifications@github.commailto:notifications@github.com> wrote:

But I have already started my module in Nowjs and now I am in a big stuff where I wanna call client side function in server side to show some output data on client side. If I tested on browser it will hit my client side but when I call it by mobile app it did not hit that function.

Can somebody help to sort out this issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/213#issuecomment-11727721.

@lavinachitara
Copy link
Author

My code in server.js

everyone.now.sayhi = function(my){
console.log(this.now.room);
nowjs.getGroup(this.now.room).now.writeSayHi('hi all');
};

and I am accessing this on client side [which is in javascript in mobile app]

now.sayhi('hello');

now.writeSayHi = function(msg_argument) {
console.log('I am in writing say hi');
}

Getting error on server console

[TypeError: Property 'writeSayHi' of object # is not a function]
TypeError: Property 'writeSayHi' of object # is not a function
at everyone.now.sayhi (C:\node\nodechat\nodechat_server.js:235:37)
at Socket.rfcHandler (C:\node\nodechat\node_modules\now\lib\user.js:111:19)
at Socket.EventEmitter.emit as $emit
at SocketNamespace.handlePacket (C:\node\nodechat\node_modules\now\node_modu
les\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (C:\node\nodechat\node_modules\now\node_modules\s
ocket.io\lib\manager.js:487:38)
at WebSocket.Transport.onMessage (C:\node\nodechat\node_modules\now\node_mod
ules\socket.io\lib\transport.js:387:20)
at Parser. (C:\node\nodechat\node_modules\now\node_modules\socket
.io\lib\transports\websocket\hybi-07-12.js:40:10)
at Parser.EventEmitter.emit (events.js:96:17)
at opcodeHandlers.1.finish (C:\node\nodechat\node_modules\now\node_modules\s
ocket.io\lib\transports\websocket\hybi-07-12.js:289:16)
at Parser.opcodeHandlers.1.expectData [as expectHandler] (C:\node\nodechat\n
ode_modules\now\node_modules\socket.io\lib\transports\websocket\hybi-07-12.js:30�

Please help me to solve above issue. I want to call client side function on server in now namespace.

@HardlyMirage
Copy link

Declare writeSayHi above now.sayhi('hello')

@lavinachitara
Copy link
Author

Thanks HardlyMirage, but I completed chat module completely for ios mobile :-) with group chat and one to one chat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants