Solved

Need to create a program to test for open TCP ports

Posted on 2012-03-16
6
308 Views
Last Modified: 2012-03-22
I have a need for a port testing tool that I can program to to read and send from one node to another in a network. I know there may be tools that could do this for me, but I want flexibility of changing the functionality as the need arises. My preferred language is Java because I would like to run on both windows and Linux.

Here is what I would like the tool to do:

listen on a specified range of ports for a known message and when we receive that message, close that port.

Similarly, I want the program to write a message to a specified set of ports.

After all ports are verified or after a specified timeout, the program should spit out a report (I can handle this part).

As a follow up question once I have the program working, I want to set it up to use secure protocol as an option.
0
Comment
Question by:Christopher Schene
  • 3
  • 3
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 37732559
This is a good framework to get you started. I also have an https version


http://technojeeves.com/joomla/index.php/free/84-server-by-david-flanagan
0
 

Author Comment

by:Christopher Schene
ID: 37732731
Looks pretty good I'll try this. I'll ask for the http version in a separate question so you get another 500 points
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37732734
No - don't worry about the points thanks
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Author Comment

by:Christopher Schene
ID: 37733705
What is the purpose of these lines in the example code?  I have taken a java class, but most of my programming is in C, C#, Vb.net---I am not familiar with the Hash templates

threadGroup = new ThreadGroup(Server.class.getName());
      this.maxConnections = maxConnections;
      services = new HashMap<Integer, Listener>();
      connections = new HashSet<Connection>(maxConnections);

It looks like a good book...I think I'll buy it.
0
 

Author Closing Comment

by:Christopher Schene
ID: 37755036
I purchased the book as well. Thanks!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37755100
What is the purpose of these lines in the example code?

There's quite a bit there - which part of that do you mean?

I purchased the book as well. Thanks!

That's a good investment!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
couple of eclipse 5 46
ejb wildfly example 2 19
Problem to Alipay 10 42
ejb message driven bean mdb creation steps 2 18
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question