Ethernet Sheild and GSM router

Look here. Is this the code you are using?

All those functions are available with that library also. This is pretty standard TCP stuff. The transport should be transparent.