wifi shield and socket programming

hi, I have arduino mega 2560 r3 and arduino wifi shield. I wrote a code in C++ as a socket programming. and I entered wifi shields ip address and port number in this code. I want to provide communication between C++ console and wifi shield code. so how can I send tcp packet to c++ console program? any help,reference or link is very appreciated.

best,

Are you looking for a telnet type connection? Like the client opens a connection and server sends a "hello" message, then client sends a request and server responds until client sends a "quit" message?

I can do that with the ethernet shield, but have never tried it with the wifi shield. It looks like the wifi shield library may have the same socket functions that would allow that.