TCP Server for a Single Client connection ONLY

Hello All,

I've searched for hours on the web and simply cannot find sample code for creating a simple TCP Server that will only allow a single connection at a time. All examples given people ask for accepting multiple client connections which is not what I want.

I'm using the #include <UIPEthernet.h> library and I have the Deek-Robot ENC28J60 Ethernet Shield on Auduino Nano.

Please someone help, I'm going mad here! thx