Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It would help to know exactly what you mean by "TCP server". You mean an HTTP server? an FTP server? A simple program that accepts connections and closes them, doing nothing in between?
What exactly are you attempting to do?
It would help to know exactly what you mean by "TCP server". You mean an HTTP server? an FTP server? A simple program that accepts connections and closes them, doing nothing in between?
What exactly are you attempting to do?
Hi goncalopp,
as you said, "A simple program that accepts connections and closes them, doing nothing in between" just handling a lot of connections, maybe the only thing I need is to see the incomming data, and at the other side I will add the option to send replies using scripts.
Thanks,
Your description sounds like netcat. But you probably know that. Also, netcat is not multithreaded, so it won't accept concurrent connections.
While I don't know such a tool myself, I found a thread discussing a similar problem. The response about ucspi-tcp / tcpserver might be what you're looking for.
Your description sounds like netcat. But you probably know that. Also, netcat is not multithreaded, so it won't accept concurrent connections.
While I don't know such a tool myself, I found a thread discussing a similar problem. The response about ucspi-tcp / tcpserver might be what you're looking for.
Yes, I know netcat, it is a nice tool, but not what I'm looking for, I'm looking for something more like GNU MyServer but just for TCP, I want to build the protocol stuck myself (on top of TCP protocol).
Did you try ucspi-tcp / tcpserver?
If you just want to have some scripts reply to predefined responses, I think it will suffice.
If, however, you want to do more than a stateless protocol, you're going to need a programming language that supports sockets (like C, C++, Java, Python, Ruby, etcetera) and you might as well do the sending/receiving/threading: it's such a small portion of the overall code that I doubt there will be frameworks for that - unless you're looking into a well defined protocol like HTTP, in which case there are thousands of them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.