Forum > Third party

TCPChat - A simple chat server in freepascal

(1/2) > >>

el3ctrolyte:
https://github.com/el3ctr0lyte/TCPChat

It uses just synapse and the basic freepascal components, so lazarus isn't really needed, making the dependancies less.

I recently wrote a program that is just a simple multi threaded, multi client server that receives messages from clients and relays them to all other clients(including the client who originally sent the message). Long ago when i was starting with lazarus and synapse (and programming in general) i was struggling to find an example of how to write just this basic kind of program. Now that i am wiser i decided to write it myself and post it online.

For now it works on most platforms(only tested in linux) but only on linux will it detect disconnections. So basically it is only practical on linux.

It is just 142 lines long, so it is great for beginners to look around and learn from. :D
Maybe someone here can add some things to it, like comments. I have a sort TODO list with things in the README file on github that i would like to check off. Maybe someone here can help with that.

I have decided that i want to change direction with this project. It is now just a simple chat server with more advanced features than originally intended. I still plan on making a seperate github repo with a tutorial on how to make a simple multi client and multi threaded chat server.

lucamar:
It's a nice example, thanks.

Only ... well, I don't want to demean your work and effort and it's more of a general observation but ...

It would be nice if example authors added a small write-up explaining how they went about to write them and why, what pitfalls and shortcomings they found and how they overcame them, etc.

Kind of, say, a small "tutorial" about the program and the programming process; it would make the examples much more useful.

IMHO, of course :-[

el3ctrolyte:
Thats a fantastic idea! I think that would be much more useful than having people manually read through the code. I am going to do this :D Thanks!

el3ctrolyte:
Where would be an appropriate place to post such a write up? I plan on writing it this weekend but i have no idea where to put on other than on github.

BlueIcaro:
Hi, thanks for sharing.


--- Quote from: el3ctrolyte on May 04, 2021, 02:05:29 pm ---Where would be an appropriate place to post such a write up? I plan on writing it this weekend but i have no idea where to put on other than on github.

--- End quote ---

I think one place can be the github, other place can we the wiki of lazarus.

/BlueIcaro

Navigation

[0] Message Index

[#] Next page

Go to full version