473,795 Members | 3,231 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TCP-based chat program

I wrote a little UDP-based chat program. It's not very user-friendly,
requiring every user to add every other user to a list. Anyway, I
want to adapt it to TCP so you don't have to do that, as well as the
ability to talk to people behind firewalls without reconfiguring them.
The first problem I have is how to have the server application relay
messages to all the clients. The other problem is how to format the
output on the client application so that it can show what other people
are saying as well as having a prompt at the bottom. Currently I have
2 seperate apps, one that listens for incoming messages, and one to
send messages, but I don't think that'd work with TCP.

The UDP app is available for DL here, if anyone is interested.
http://sodasphere.us.to/pub/yipee
Aug 27 '08 #1
2 2872
On 2008-08-27, phider1 <ph*****@gmail. comwrote:
I wrote a little UDP-based chat program. It's not very user-friendly,
requiring every user to add every other user to a list. Anyway, I
want to adapt it to TCP so you don't have to do that, as well as the
ability to talk to people behind firewalls without reconfiguring them.
The first problem I have is how to have the server application relay
messages to all the clients. The other problem is how to format the
output on the client application so that it can show what other people
are saying as well as having a prompt at the bottom. Currently I have
2 seperate apps, one that listens for incoming messages, and one to
send messages, but I don't think that'd work with TCP.
comp.programmin g would be better for general program design.
For specific platforms or network protocols, there are more
specific groups to try.

comp.lang.c deals with standard C which does not natively
support TCP or UDP.

--
Andrew Poelstra ap*******@wpsof tware.com
To email me, use the above email addresss with .com set to .net
Aug 27 '08 #2
On Aug 27, 6:21*pm, Andrew Poelstra <apoels...@supe rnova.homewrote :
On 2008-08-27, phider1 <phid...@gmail. comwrote:
I wrote a little UDP-based chat program. *It's not very user-friendly,
requiring every user to add every other user to a list. *Anyway, I
want to adapt it to TCP so you don't have to do that, as well as the
ability to talk to people behind firewalls without reconfiguring them.
The first problem I have is how to have the server application relay
messages to all the clients. *The other problem is how to format the
output on the client application so that it can show what other people
are saying as well as having a prompt at the bottom. *Currently I have
2 seperate apps, one that listens for incoming messages, and one to
send messages, but I don't think that'd work with TCP.

comp.programmin g would be better for general program design.
For specific platforms or network protocols, there are more
specific groups to try.

comp.lang.c deals with standard C which does not natively
support TCP or UDP.

--
Andrew Poelstra * * * * * * * * * * * *apoels...@wpso ftware.com
To email me, use the above email addresss with .com set to .net
Thanks, I'll go repost there.
Aug 27 '08 #3

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

Similar topics

1
2054
by: Naveen Mukkelli | last post by:
Hi, I am working with a client/server application that sends and receives structures of size 2000 bytes through TCP/IP Sockets. As MSS(Maximum Segment Size) is 1500 bytes, TCP/IP protocol on the sending side would chop the packet into smaller packets, lets say 1400, 600 and sends on to the network. Does the TCP/IP protocol on receiving side automatically merges those
2
977
by: Richard Gass | last post by:
First weird problem... The other day, out of the blue, our application reported an error saying it could not connect to the postgres db. The hostname that it reported is the name of the machine but it hasn't been used in awhile. However, it does have a valid cname entry in dns pointing to the correct host. I added the name in the /etc/hosts file on the server and the problem was fixed. Next weird problem... I recently upgraded a few...
0
2379
by: Richard Gass | last post by:
First weird problem... The other day, out of the blue, our application reported an error saying it could not connect to the postgres db. The hostname that it reported is the name of the machine but it hasn't been used in awhile. However, it does have a valid cname entry in dns pointing to the correct host. I added the name in the /etc/hosts file on the server and the problem was fixed. Next weird problem... I recently upgraded a few...
13
3594
by: smerf | last post by:
I have a constant UDP connection from one office to another office. I use it for an in-house application and it works just fine. But, I want to add file transfer to my little app without requiring another port be opened on the firewall and I don't want to reinvent the TCP wheel. Is there a way to tunnel TCP through my existing UDP connection and take advantage of the packet checks that TCP offers for transfering files?
4
11291
by: Sir C4 | last post by:
Can someone give a quick example of how to check for activity on a TCP port? For example, I'd like to watch and listen for activity on port 80. Once activity is detected, I'd like an event to be triggered. Thanks in advanced.
0
10435
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
10213
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
9037
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
7538
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
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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
4113
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
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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.