chat

Chatroom in C / Socket programming in Linux

梦想的初衷 提交于 2019-12-03 07:48:37
问题 I have a simple server and client C code to do a chatroom for multiclients using threads (pthread library). The problem I've been having is that I can't think a way of making the server write every message that a client sends over the socket into all other clients. I've read other similar posts in here and it was helpless. Please help me I need to do this for school. I'll send both codes right away. Server.c: #include<stdio.h> #include<string.h> //strlen #include<stdlib.h> //strlen #include

SignalR multiple chat rooms

这一生的挚爱 提交于 2019-12-03 07:14:09
问题 I am planning to create a chat application, and I've read that SignalR is one of the best technologies to apply. I've seen examples of it, but they only have a single chat room. I want to have multiple chat rooms. The user will just choose one of those chat rooms. Although I'm a beginner, I think to create a single chat room in SignalR is by this: <script type="text/javascript"> $(function () { var connection = $.connection.communicator; connection.receive = function (from, msg) { $("

Simple PHP long polling chat script, too simple?

萝らか妹 提交于 2019-12-03 07:02:32
Im working on a simple chat app, probably 10 to 20 users per room. The Script that queries the database for new messages looks too simple for all the request it'll be getting. Below is the block of code that loops for new messages, the rest of the script is just getting the variables, construction of the query and the json response object: $sleepTime = 1; //Seconds $data = ""; $timeout = 0; //Query database for data while(!$data and $timeout < 10){ $data = getQuery($sql); if(!$data){ //No new messages on the chat flush(); //Wait for new Messages sleep($sleepTime); $timeout += 1; }else{ break;

didReceiveRemoteNotification not being called when I tap on app icon after receiving a push notification while on background

℡╲_俬逩灬. 提交于 2019-12-03 06:51:42
When my app is on background and I receive a remote notification, two things can happen: I tap on the push notification banner, my apps comes to foreground and didReceiveRemoteNotification is called. I tap on my app icon from the springboard, my app comes to foreground and didReceiveRemoteNotification IS NOT called. So, in the scenario 1, I can update my counter of unread messages inside the app in response to didReceiveRemoteNotification. In the scenario 2, I can't. How can I solve this using Quickblox? As one possible variant: @implementation AppDelegate - (BOOL)application:(UIApplication *

Use HTTP Keep-Alive for server to communicate to client

霸气de小男生 提交于 2019-12-03 06:07:58
Recently in an interview I was asked how I would approach an online chat client application. I went through the standard "polling" solution but was cut off because the interviewer was looking for the "HTTP 1.1 keep-alive" method. Having used HTTP for quite a while and remembering that the whole point was to be "stateless", this never occurred to me (also, not to mention that the keep-alive is not consistently implemented). My question is, is it possible for a web server to broadcast and/or send information to a client when the "keep-alive" header has been set? Keep-alive simply holds a TCP

Node.js video chat application [closed]

╄→гoц情女王★ 提交于 2019-12-03 05:53:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . How would you implement a video chat application using node.js? Any resources(tutorials, books, links) or a general gameplan/strategy would be greatly appreciated 回答1: Right now there are two Node.js projects for video chat. Both are experimental, but I've heard they work quite well if you can get them running.

iOS chat APNS, sockets or time interval [closed]

不问归期 提交于 2019-12-03 05:45:56
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm making a chat app for iPhone, but im not sure how conversation messages should come instantly. I have read tons of Google results

How does in-browser chat work?

别等时光非礼了梦想. 提交于 2019-12-03 04:07:12
问题 Just curious. How exactly does chatting in a browser work? Usually if a user goes to a web page, his/her webbrowser requests the page content. A server produces output and sends it to the user's computer. But with chatting it's a little bit the other way around (well not exactly). It's not the user requesting a chat message from some server, but rather the server that sends it directly. Now this is really simple to achieve with a "normal" server, but the thing that the server sends it to a

running my own jabber/xmpp server [closed]

允我心安 提交于 2019-12-03 03:43:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Can I make my own jabber server.So that if I run my website xyz then people should be be able to get their jabber id from my website by registering on my website. Is there any open source implementation of jabber server that I can use? 回答1: I use Openfire to run my Jabber server and am quite happy with it.

ejabberd: retrieve chat history from mysql db

妖精的绣舞 提交于 2019-12-03 03:29:34
I'm building a chat system based on ejabberd using an iOS client (and XMPPFramework ). My current chat system supports only one-on-one conversations between users saving a chat history on a MySQL database. In order to recreate the same chat system, i'd need ejabberd to retrieve chat history from my database so the users don't lose previous conversations when switching to the new chat system. I'd like not to save the conversation client-side since the iOS app can be deleted and reinstalled (or the user could switch device). Is it possible to make ejabberd read chat history from my MySQL db?