473,946 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Developing chat application

Hello,

I've assigned to develop a simple chat application using "C" program.
I've written program but missing one thing. Simultaneously both user
can type in their window. But i dont know how to implement this, in
such way that at all the time, same thread/process should be able to
send and recieve message from/to between their desination.

I've written code, in that once the user1 typed the message, it cant
send an another message untill it gets a message from the user2. Becoz
i 've coded as receive and send in user2, and in user1 send and
receive. I believe i've explained my problem.

I think i'm missing some where, can any one point how to achieve this.

Best regards,
Sangeetha.
Nov 14 '05 #1
2 6338

"sangeetha" <sa*********@in dia.com> wrote

I've assigned to develop a simple chat application using "C" program.
I've written program but missing one thing. Simultaneously both user
can type in their window. But i dont know how to implement this, in
such way that at all the time, same thread/process should be able to
send and recieve message from/to between their desination.

I've written code, in that once the user1 typed the message, it cant
send an another message untill it gets a message from the user2. Becoz
i 've coded as receive and send in user2, and in user1 send and
receive. I believe i've explained my problem.

If you're writing for a desktop system, you will probably need two
"clients", terminals with VDU and keyboard.
C doesn't specify how to do this. ANSI C programs just have stdin and
stdout, which are inherently single streams and support only one user. You
need to look at the libraries on your system, which is probably either X or
MS Windows.
Nov 14 '05 #2
"sangeetha" <sa*********@in dia.com> wrote in message
news:4f******** *************** ***@posting.goo gle.com...
Hello,

I've assigned to develop a simple chat application using "C" program.
I've written program but missing one thing. Simultaneously both user
can type in their window. But i dont know how to implement this, in
such way that at all the time, same thread/process should be able to
send and recieve message from/to between their desination.

I've written code, in that once the user1 typed the message, it cant
send an another message untill it gets a message from the user2. Becoz
i 've coded as receive and send in user2, and in user1 send and
receive. I believe i've explained my problem.
I believe you haven't explained it very well. However, could this be an
issue with blocking sockets? Ie, you're waiting for a message from the other
end of your connection and program is blocking on the receive call? Anyway,
sockets are off-topic here, so you will not get the best advice, best go
find a newsgroup dedicated to your specific platform. However, if the
problem is as I've described, either look into non-blocking sockets, or
consider a multi-process setup.


I think i'm missing some where, can any one point how to achieve this.

Best regards,
Sangeetha.

Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2390
by: Peter | last post by:
Hi all, I have a website where users login to and I wish to add Instant Messenger between 2 users.. for instance, clicking "IM" on someone's profile (assuming they're online of course) will prompt the other user if they wish to chat or not.. if they do.. initiate 1-on-1 chat. I've seen it done on faceparty.com which I believe uses DigiChat (java). Unfortunately it's too expensive to purchase so I wish to develop a simplistic version...
2
1679
by: oracle3001 | last post by:
Hi All, I want to capture / read the text flowing through a chat window that is part of an external application. I should note that I don't just want to capture the text in the chat window once, I want to get the new text as and when it is posted into the chat window
1
2432
by: vasss_n | last post by:
I am planning to create a DIscussion Forunm cum Chat application ASP.NET, would any plese guide me in data design for ideal application. Is there any sample code available on net fro free to have a look.... Thanks Vas
3
3455
by: John Wright | last post by:
I am trying to create a very simple chat program using UDP through a web page. I am having problems getting this going. All the examples I've seen deal with remoting or application variables, or web services, etc. Does anyone have any resources to point me to (either VB.NET or C#) that explains how to create a simple chat on a web page? thanks. John
3
2607
by: A | last post by:
Hi all! I am currently working on a project where I need to create a web-based chat application that will be used for auctions. If possible, could I get some advice on how to create chat applications and which part of the .NET framework should I delve into? I would really appreciate the help! Cheers,
2
1576
by: Ahmed | last post by:
Hello everyone, I am designing a chat program for a company. The program will be used locally(through lan). I am progamming the chat program using VB.NET windows application. Lets consider the following scenario: Clients want to ask salespersons questions about products. A salesperson can handle more than one customer at a time (depending on his/her preferences). I finished the the client progarm and the sales person program. I am...
4
2203
by: JIM.H. | last post by:
Hello, I need to write a chat room web application in .net 1.1, does anyone know any sample application I can use to start?
8
2293
by: Bllich | last post by:
Greetings, there is a nice multi-user chat application written by Microsoft in VB which code is on the location: http://download.microsoft.com/download/c/4/8/c488a081-85f2-4a2e-a121- ef5cad681313/vbSockets.exe I started translating it in C# and couldn't finish it.. The program 5 years old :) , but I find it very useful, it's
4
2859
by: Ronald Green | last post by:
Hi, I have this theoretical problem: Say that I need a chat server that also has a database where it saves all conversations. However, I need several servers for availability and load balancing. Now arises the problem of how to synchronize the servers in the shortest interval (synchronize databases that is). I'm not sure that merge or peer-to-peer replication in sql 2005 is the best solution for synchronization (because it still has a...
0
10151
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9977
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11556
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11150
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9882
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8245
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6106
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4933
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3533
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.