esp8266 create tcp server but can't receive data

I am using arduino ide to program esp8266 (wifi module) and I created a tcp server on the module then i used tcp client tester program to send and receive data .this is the code i am using .
I managed to send data from the module but can't receive any data from my phone , Can anyone help me?

#include <ESP8266WiFi.h>
int i =0;
char ssid[] = "moataz";          //  your network SSID (name)
char pass[] = "58295829";   // your network password
int status = WL_IDLE_STATUS;

WiFiServer server(1050);

void setup() 
{
  // initialize serial:
  Serial.begin(115200);
  WiFi.mode(WIFI_AP_STA);
  WiFi.begin("moataz", "58295829");
  while (WiFi.status() != WL_CONNECTED) 
  {
    delay(500);
    Serial.print(".");
  } 
  Serial.println("connectedd");
    server.begin();
    IPAddress myAddress = WiFi.localIP();
    Serial.println(myAddress);
delay(200);
}

bool alreadyConnected = 0;
void loop() {
WiFiClient client = server.available();
 if (client) {
    if (!alreadyConnected) {
      // clear out the input buffer:
      client.flush();
      Serial.println("We have a new client");
      client.println("Hello, client!");
      alreadyConnected = true;
    }
 }
 if (client.available() > 0) {
      char thisChar = client.read();
      Serial.println("We got data");
      Serial.println(thisChar);
      delay(200);
   }
}

First, a better forum for non-hardware ESP8266 is here:
http://www.esp8266.com/viewforum.php?f=25

There you will find working examples and sample code. Speaking of sample code, when you installed the ESP8266 into the Arduino IDE via the XML path, some examples were included. Be sure to study these examples.

Ray

first thank you mrburnette for your help
I read some of the example but I can't find what I am looking for , and I also ask in esp266 forum but no luck yet

Hi There,

I want to create ESP-Laptop wifi connection. So that i can send data from ESP to Laptop wirelessly.
Please guide me on this, from where should I start?
I am using Arduino ide to program my ESP.

Thanks

A beginner's guide to the ESP8266.

Pieter