Interrupt on ENC28J60 ethernet module

Hello everybody! In my new project I have the necessity to use the interrupt function for the ethernet connectivity, but I have some problem with my ENC28J60 module. In the loop void it check the sensor status and write the result on a display, but i would that when someone make a web request it stop the loop and transmit the HTML based page. I tried to use the interrupt pin on the module, but doesn't work properly. I saw the ENC28J60's datasheet and I see that there are various type of flag that enable the interrupt pin, but i don't know what flag is enabled...

How can i do, or if I can change the flag? Have you some idea to help me?

You should post your code. There is no reason to use interrupts. The server should be checking often enough for slow-to-arrive, no immediate expectation of a response, connections.

#include <EtherCard.h>
#define TCP_FLAGS_FIN_V 1 //as declared in net.h
#define TCP_FLAGS_ACK_V 0x10 //as declared in net.h
static byte ip[] = { 192, 168, 1, 3 };
static byte mac[] = { 0x7A, 0x69, 0x69, 0x2D, 0x3E, 0x39 };
byte Ethernet::buffer[900]; 

void setup() {
  // Setup Porte Pin
  Serial.println("---- Setup ---");

  // Setup Ethernet

  attachInterrupt(0, interrupt_ethernet, RISING);

  Serial.println("---- Loop ----");

void loop()

  // Check sensor status


void interrupt_ethernet() {
  word pos = ether.packetLoop(ether.packetReceive());
  if (pos) {
    char* data = (char *) Ethernet::buffer + pos;
    if (strncmp("GET / ", data, 6) == 0) {
      memcpy_P(ether.tcpOffset(), pageHome, sizeof pageHome);
      ether.httpServerReply_with_flags(sizeof pageHome - 1, TCP_FLAGS_ACK_V | TCP_FLAGS_FIN_V);

The code is like this.
I would that only when there are a request it send me a rapid response… I don’t want wait the finish of the loop

I would that only when there are a request it send me a rapid response.

Pigs would like wings, too.

I don't want wait the finish of the loop

The loop() function can execute something like 150,000 times per second. If you can't wait 1/150000 of a second for a response, over an ethernet connection, you have very unrealistic expectations.

My sketch isn't fast like you told. I have function that require a lot of time.

What about the W5100? Work better the interrupt function in this board?

I have function that require a lot of time.

Then, you need to reconsider how that function operates. If "a lot of time" involves delay(), then it's definitely time to rewrite your sketch.

No, there aren't delay().