chat

Building a chat system with Javascript [closed]

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to build a small(for less than 100 users) chat system with a javascript and html alone. It should be able to work consistently in a browser and store all the chats in a database at server? Now if it is possible then what would be the merits and demerits of it comparing it to other traditional chat client. 回答1: Yes/No. You can implement a chat system using JavaScript and HTML alone using one of three things P2P cross browser communication (only works in opera) CORS/JSONP remote server to relay chat messages (requires a third

Unsubscribed from channel, still on channel

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using PubNub for an IOS app (IOS SDK 8.0). When I am trying to unsubscribe from a channel on "applicationDidEnterBackground" event, I get the following console output. It says the channel is unsubscribed, but when I check from admin console I am still on the channel. Can you give some advice on this ? Here is the line I am using in "applicationDidEnterBackground": PubNub.unsubscribeFromChannel(channelToReceive,{(list, err:PNError!)-> Void in if(err != nil){ println(err.localizedFailureReason) } else { println("Unsubscribed...") } })

Socket.IO - how to emit event to everybody in the room, including sender?

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: io.emit('chat message', msg); Now I added rooms and try to do the same thing using socket.broadcast.to(socket.room).emit('chat message', msg); or socket.to(socket.room).emit('chat message', msg); but both only send the message to receivers, but not to the sender. What should I do so that this message also goes to the sender, who's in the chat room as well? Thanks! 回答1: Found an answer in this question: Socket.io Won't Emit messages to rooms on discconect simply use io.sockets.in(socket.room).emit('chat message', msg); 文章来源: Socket.IO - how

Twilio Chat API, getUnconsumedMessagesCount always 0

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to get the number of messages unread for a specific member in a specific channel. To do this I was hoping to use channel.getUnconsumedMessagesCount() as defined in the documentation . myChannel.join() .then(function(c) { console.log('Joined channel ' + c.sid); return myChannel.getUnconsumedMessagesCount(); }) .then(m => { console.log('current count unread: ' + m); }); The unread count always return 0. To test, I do the following: user 2 submitting a message to myChannel in another chrome tab user 2 myChannel get's updated with the

Auto Scroll to Bottom DIV

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have made chat system, but I had a problem with scrolling div for the messages that the scroll bar must be at the bottom as default. DIV <div class="chat-body chat-scroll" id="chat-scroll"></div> STYLE .chat-scroll{position: absolute; top:0px; bottom: 0px; overflow-y: auto;} I use JQuery for submit message from the input form to reload the content of the #chat-scroll and the auto scrolling is okay for submit, but when at first load of the page, the scroll only stays at the middle of the div #chat-scroll. Unlike if I submit a message it

Best way to develop a simple video chat app for android and iOS [closed]

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to develop a simple Video Chat app. But i don't know how to Start. I know there are a couple ways to Do this. WebRTC, Adobe Flex. But WebRTC is only for p2p ans the Adobe Produkts are expensive. Do you know better ways to develop a Video Chat? The best would be a small tutorial. Thx 回答1: I'm a developer with the easyRTC project. It is WebRTC based (thus no IOS), but it's also easy for most people with a little JavaScript experience to get working. Opensource Homepage Live Demo site Support forum Video of Windows 7

Scaling a chat app - short polling vs. long polling (AJAX, PHP)

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I run a website where users can chat with each other through the browser (think Facebook chat). What is the best way to handle the live interaction? (Right now I have a poll going every 30 seconds to update online users and new incoming messages, and another poll going on chat pages every second to get new messages.) Things I've considered: HTML5 Web Sockets: didn't use this because it doesn't work in all browsers (only chrome). Flash Sockets: didn't use this because I wanted to eventually support mobile web. Right now, I am using short

Simple chat protocol

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm learning networking and threading in C#. For that purpose I'm developing chat over network. Currently I have basic communication between client - server (TCP). Server can work with multiple clients. But only client - server communication. Basically client sends ASCII encoded message to server, then server decodes it and shows in console. By now I want to implement Client-Client communication. Suppose we have online list of clients in each client and message box for sending message to each client. Next step is clicking button,

Building a chat app that uses a node.js server in IOS [closed]

落花浮王杯 提交于 2019-12-03 08:17:26
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . I am trying to build an iPhone(native) chat app that uses node.js on socket.io. What is the best way to create chat application on IOS Is there is any way to create chat application with the node.js server in IOS Could anyone give me suggestion? Thanks for you suggestion Tim Of cuz you could create chat application using Socket.io with iOS/Android and HTML! There are 2 ways for you to do

Retrieve history chat Openfire XMPP framework

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've developed a chat app using XMPPframwork of Robbie Hanson and Openfire server. I can chat one to one and chat group successfully. But when I get history of chat, I can't get whole history. I use XEP-0136 to archieve history: Send IQ: 100 Receive: asdf aafs sax 0 2 3 But when I open the database, ofMessageArchive table, I can see much more messages with group12 (~20 messages) while in the result, I only got 3. May I miss something? 回答1: Follow this format, it works for me perfectly, urn : xmpp : mam : 0 id@domain message_count *