rejetto forum
May 25, 2012, 11:01:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED]Listen on multiple ports  (Read 536 times)
0 Members and 1 Guest are viewing this topic.
tji
Occasional poster
*
Offline Offline

United States United States

Posts: 3


View Profile
« on: March 15, 2011, 12:28:45 AM »

I have a lab environment, where I am using hfs to transfer files on various ports to simulate application traffic.  For example, hfs on port 3306 simulates connecting to a database.

Is there any way to make one instance of hfs listen on multiple ports?  So, I can connect on 80, 8000, 8080, and 3306 and get to the same hfs files?
« Last Edit: March 17, 2011, 08:54:18 AM by Mars » Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #1 on: March 15, 2011, 05:53:38 AM »

The only solution is to use hfs in mode multiple instance

1) uncheck
   menu>> start/exit>> only 1 instance

2) save always option on regitry
   menu>> save options>> to registry (curent user or all users)

3) lauch hfs by using a batch file
HFS WIKI command line]
Warning: this feature is available only since version 2.3
You can pass ini commands directly from the command line. If only one instance is enabled, this is the easy way to command HFS from the command line.
This is an example to switch off the server:
hfs -c active=noTo specify many commands, separate them by \n. Example:
hfs -c active=yes\nport=8080
-d <X>
Waits at start for <X> tenths of second.

create a txt file namedhfs.bat with those four lines
@echo off
hfs8000.lnk
hfs8080.lnk
hfs3306.lnk
hfs80.lnk


create  four shorcuts of hfs.exe named as above and for each command line use one of follow
hfs8000.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=no\nauto-save-options=no\nport=8000
hfs8080.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=no\nauto-save-options=no\nport=8080 -d 10
hfs3306.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=no\nauto-save-options=no\nport=3306 -d 20
hfs80.lnk   -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=yes\nauto-save-options=yes\nport=80 -d 30


put the five files inside hfs.exe folder and run hfs.bat
Logged
tji
Occasional poster
*
Offline Offline

United States United States

Posts: 3


View Profile
« Reply #2 on: March 17, 2011, 12:13:28 AM »

Thanks Mars,  that's perfect.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 24, 2012, 12:23:50 PM
anything