chat

Use line wrap in JTextArea that wraps the line to a specific position in JTextArea

可紊 提交于 2020-01-06 06:34:25
问题 I have a JTextArea that picks up text from another JTextArea and displays that text as seen in this image: I want the JTextArea to wrap the line from where rahul is written as in previous image. And below is the code from my smaller JTextArea from which the text is shown in the larger JTextArea . SimpleDateFormat sdf=new SimpleDateFormat("HH:mm"); String str=MainFrame.un+" ("+sdf.format(new Date())+") :"+txtSend.getText(); DataServices.send(runm+":"+str); // for sending this to its socket

Chat works only one-way with Smack 4.1.7 Android

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 03:11:47
问题 I am working on Android Chat app based on Smack 4.1.7 . I have created my XMPP related operations on Saperate class said MyXMPP.java. and in my app's Application class i am initializing MyXMPP class objects. my problem is, suppose we have user 1 and user 2. if user 1 sends message to user 2 then user 2 can get message but cant reply back. means if user 2 trying to reply then user 1 can not get user 2's reply. in short if user 1 initiates chatting then, only user 1 can send message. user 2 can

Chat works only one-way with Smack 4.1.7 Android

女生的网名这么多〃 提交于 2020-01-06 03:11:01
问题 I am working on Android Chat app based on Smack 4.1.7 . I have created my XMPP related operations on Saperate class said MyXMPP.java. and in my app's Application class i am initializing MyXMPP class objects. my problem is, suppose we have user 1 and user 2. if user 1 sends message to user 2 then user 2 can get message but cant reply back. means if user 2 trying to reply then user 1 can not get user 2's reply. in short if user 1 initiates chatting then, only user 1 can send message. user 2 can

Adding chat through websocket, to an existing PHP web app

人走茶凉 提交于 2020-01-05 05:37:06
问题 I have an existing web application on the standard PHP/Apache platform. Now, what I want is to add chat functionality, and I want it to be real-time over a websocket, and to that extend I've studied socket.io on nodejs a little bit. So in addition to Apache running the big PHP app, I would have nodejs with socket.io running chat. But what I don't really understand, is how would I recognise my users in the code for nodejs chat? For one, Apache and nodejs won't be able to run on the same port,

AJAX Chat Box Scrolling Up Issue

断了今生、忘了曾经 提交于 2020-01-04 21:40:48
问题 Hi I am writing a chat website and I have a problem with the div containing the messages. In the CSS the div containing the messages has overflow: auto; to allow scroll bars. Now the problem is when ajax is fetching the messages through a PHP script that fetches the messages from the database, you cannot scroll up. The AJAX refreshMessages() function is set to update every second using window.setInterval(refreshMessages(), 1000); . This is what I want but when I scroll up to see previous

AJAX Chat Box Scrolling Up Issue

萝らか妹 提交于 2020-01-04 21:40:42
问题 Hi I am writing a chat website and I have a problem with the div containing the messages. In the CSS the div containing the messages has overflow: auto; to allow scroll bars. Now the problem is when ajax is fetching the messages through a PHP script that fetches the messages from the database, you cannot scroll up. The AJAX refreshMessages() function is set to update every second using window.setInterval(refreshMessages(), 1000); . This is what I want but when I scroll up to see previous

How to build a web-based chat system using ruby Gserver

a 夏天 提交于 2020-01-04 14:29:17
问题 I am trying to build a web based chat system and I am going to user ruby gserver. I have looked at this example . However my question is when I get the user input from the web and in the controller I have the user input. Now how does client connect to server to pass this user input value to the server. The server after getting the value will populate a database. So the client will do all read operations from database. However I was wondering how will client connect to server. It is a simple

How to test chat web app

北慕城南 提交于 2020-01-04 09:19:10
问题 I am developing chat application, using node.js socket.io module on a server, and javascript on a client. As it become more complex, I become tired to test different usage scenarios by clicking across browsers. At now I use different browsers in order to separate cookies. So in Firefox there is one chat participant, in Opera - second, etc. Therefore my question is: Can I automate this somehow? I've heard about headless testing engines like Phantom JS, Selenium WebDriver, but I don't know how

udp chat server in c

て烟熏妆下的殇ゞ 提交于 2020-01-03 05:41:11
问题 i am trying to write udp chat server in c language. i have written tcp chat server before and it is ok. in tcp server, accept function returns an fd number and server communicate with a specific client according to this fd number. but in udp, how can i listen a specific client? In my tcp server, after a client connect to server, a thread is created and it listen this client. So for each client, there is a thread that listen to according to fd number that is returned from accept function. so

Quickblox iOS: Connecting 2 users in video chat without initiating a call

試著忘記壹切 提交于 2020-01-02 23:48:41
问题 I have a video chat requirement wherein I have to connect 2 (somewhat related) users through video chat. I am not finding necessary api to call, hence the question. I am basically following this tutorial but it seems it doesn't have everything I need. I do not need explicit "call to this user" sort of function. The user never gets to see entire user list. As a result, I wonder if I could have X number of users calling and another X number of users waiting to accept that call. To summarize: I