PDA

View Full Version : port 8080


xlthim
08-15-2008, 04:26 PM
I already have a server running on port 8080. How do I make Gateway work on another port? In the xmlrpcinterface I found the localhost:8080 url. I changed that and rebuilt the code, moved the executable to my client machine, but it still says "unable to start XML-RPC server on port 8080". Is there a setting in the Gateway program itself? tks xlthim.

mgenti
08-15-2008, 04:27 PM
Yes, when starting the SNAP Gateway you can use the command line
switch -p to specify which port you would like to listen on.

xlthim
08-15-2008, 04:31 PM
How do I do that from C# code? My server program, which listens to the Gateway calls, launches Gateway. xlthim

admin
08-15-2008, 04:38 PM
I'm not sure I understand your question, are you starting the SNAP Gateway from another application?

xlthim
08-15-2008, 04:44 PM
I have a console application that reads in the data from all the RF engines called a Sensor Server. One of the first things the Sensor Server does is to kill Gateway if it is running, then launch a new instance of it to make sure I start fresh. I create a process named gw. I define gw path to gateway.exe, then gw.Start(). This has always worked great in my coding environment, but I never had a video server running on port 8080. I am trying to figure out how to command gateway to start from a console line so I can add -p8910 to the end of it. My code has to do this. I can't just open a console, launch gateway, then go on about my business. tks xlthim.

mgenti
08-15-2008, 04:55 PM
The specifics of how to start an external application varies from language to language so I would have to direct you towards the documentation for the functions you are using.

If the language you are using doesn't support passing the command lines switch you could create a batch file that starts the SNAP Gateway with the command lines switches.

call SnapGateway.exe -p 2222

xlthim
08-15-2008, 04:57 PM
gw.StartInfo.FileName = "C:\\Program Files\\SNAP Gateway\\SnapGateway.exe";
gw.StartInfo.Arguments = "-p8910";
gw.Start();

I see sensors!!

mgenti
08-15-2008, 04:59 PM
Glad to hear you got it working!