I am facing same problem , i want to connect to my local web-server (Wamp) trough esp for reduce connection time, I think the main problem is that ESP connects to the wifi router , the router all what he can do is to forward us to another computer inside the LAN (in our case is the PC which is runs the server),
Wamp server has option for allowing other people on Local Network access to other PC server but again this is not done trough the router... this is done trough the LAN cables inside the walls. . .
There is very nice solution i have found to communicate with my computer but the problem is lose of packets as fast as you try to send ....more packets will be lost(in my case i use sensors and deep sleep i don't know why is this behavior, this has something to do with long calculation time i think).
UDP packets you can accomplish that using esp as client that sending UDP packets to server which runs UDP receiver , here is example of ESP(c) and Java :
ESP :
http://www.iotfrog.com/en/articles/article/227Java :
http://www.java2s.com/Code/Java/Network ... ockets.htm