Any idea which of EtherShield or EtherCard would be a better start ?
In the meaning of closest API psock is the closest, but it's very difficult to debug using Serial.print(..) only without hardware debugger.
Also take into account that psock is designed in a very complex way in the meaning of working with threads, so it's behaviour is pretty strange: it can go out of infinite loop in a thread and move back later.
So you have to understand psock threads idea first. I believe that with hardware debugger and/or deep knowledge of TCP it's much more easy.
Another approach can be to get one of existing tiny TCP implementation (f.e. lwIP http://savannah.nongnu.org/projects/lwip/
) and port to ATMega/Arduino + Enc28j60 thought i'm not sure that it can be done as it works with hardware closely.
Anybody wanting to collaborate on that ? The first step wouldn't include any programming, only collaborate to understand the differences... And why not, put the result somewhere in the playground.
I've created stubs for enc28j60 https://github.com/4ntoine/ArduinoCommander-ethernet/tree/master/Ethernet
to make it easier as client-side (ArduinoCommander) is ready.
Or one can create simple Echo sketch..