Solved

Need to create a program to test for open TCP ports

Posted on 2012-03-16
6
309 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb wildfly example 2 70
java imports not found 4 47
Java Eclipse Loop 3 28
program arguments vs VM arguments 4 25
In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

713 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