View Single Post
  #1   (View Single Post)  
Old 31st July 2015
mattthumper mattthumper is offline
Real Name: Matt Morrow
Port Guard
 
Join Date: Jul 2015
Location: Virginia, USA
Posts: 20
Question Client/Server, Java, OpenBSD and Communication Ports

All,

How do I find out what ports are available for me to use on my (Dell) OpenBSD desktop system?

Background -
-------------
I have used a very simple Java client/server program for years and years.
It's a simple reminder/scheduler program that works just like 'at' called 'mat' which stands for '(m)y at'.
I wrote it while on a project where regular users (like me) were not permitted to use 'at', only the system administators could use 'at'.
We were, however, allowed to write and execute our own Java programs, so I wrote my own 'at'.

Nowadays I use it almost exclusively as an hourly reminder that uses the host system's echo command (echo on Unix and Linux, 'cmd.exe /c echo' on Windoze).
It also plays an audio alert to get your attention (BEEP-BEEP from the old Roadrunner cartoon) and then echo's your reminder to stdout.


Here's some further information -
-----------------------------------
The client threads communicate with the server using a port that I specify in an .init file.
I've used 'PORT 45654' on both Windows 7, Windows NT and Linux boxes.
Years ago I just selected it from those ports that are typically available (regardless of OS).
As a matter of fact, I've used that exact same port on this same Dell desktop when I was running Fedora on it.


Java information, and the problem -
-----------------------------------
The program executes and displays no errors.
The reminders just never appear in the output window, and the audio alert never sounds either.

My Java program uses in the server:
serverSocket = new ServerSocket(PORTNUM.intValue());

and the client uses:
socket = new Socket(address, PORTNUM.intValue());
( Where address isn't needed - it's just "address=new String();" )

So, how do I allow simple client/server communication through a port in OpenBSD?

TIA, Matt

Last edited by mattthumper; 31st July 2015 at 04:42 PM.
Reply With Quote