Is it possible to create multiple servers on Arduino Ethernet

Hello, I'm working on a project and trying to create multiple switches driven by a network with a arduino internet. Using mudbus library to exchange output gates. In a basic description it creates an ethernet server and responds incoming. Also I need to establish user given names of the output gates, so I'm creating another ethernet server on a different port. Is it possible to create two servers on the same ip, but different ports on a standard arduino ethernet?

Is it possible to create two servers on the same ip, but different ports on a standard arduino ethernet?

I really don't see this as necessary. The Arduino can parse the GET request to determine what it needs to do.

GET /one?some&data HTTP 1.0

would be handled different from

GET /two?other&data HTTP 1.0

It's not necessary, I'm just a little bit a lazy for reverse engineering of others software

I must tell you, I am surprised. Yes, you can. I have two servers running on my Mega2560/Ethernet shield right now. One on port 80, and the other on port 8080 with two different web pages. It knows the difference. Declare two instances of EthernetServer like this:

EthernetServer server(80);
EthernetServer server2(8080);

Then in your setup

server.begin();
server2.begin();

Then in your loop

// check port 80
EthernetClient client = server.available();
if(client) {
  // do port 80 page
}

// check port 8080
client = server2.available();
if(client) {
  // do port 8080 page
}

Thank you

In 2014, I did hacks to the Ethernet library to allow you to listen for multiple connections on the same port.

http://subethasoftware.com/2013/04/09/arduino-ethernet-and-multiple-socket-server-connections/

Currently, if you listen on a port (like telnet PORT 23) and get a connection, any other connection attempts to that port hang while it is in use. My modifications allow future connections to also be handled. I provide a simple example that sends other connections a message like "System busy. Try back later." But, in my programs, I am using it so multiple telnets can be handled at the same time.

I need to see if it is possible to get the Arduino team to look at my hack and see if it can be implemented.

Me too. It is just a basic sketch you can modify for either telnet or any persistent TCP/HTTP connections. http://playground.arduino.cc/Code/Telnet

PaulS: I really don't see this as necessary. The Arduino can parse the GET request to determine what it needs to do.

GET /one?some&data HTTP 1.0

would be handled different from

GET /two?other&data HTTP 1.0

I was looking for this .... Need documentation and example codes.

Tried TextFinder, not able to parse both.

Tried TextFinder, not able to parse both.

Not able to see where you tried.

Not able to fathom why you couldn't write your own code to read, save, and parse the client request yourself, either.