我用是AsyncSocket.h,AsyncSocket.m看了好多文章上介绍的发送函数
这是我用的服务端的发送函数
-(void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag
{
    NSString *receive = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    if (receive == NULL)
    {
        NSLog(@"数据为空");
    }
    else
    {
    [self addText:[NSString stringWithFormat:@"%@",receive]];
    NSString *recv= [NSString stringWithFormat:@"收到:%@",receive];
    NSLog(@"fasong%@",recv);
    [s readDataWithTimeout:-1 tag:0];
}下边是我自己写的
-(IBAction)recvData:(id)sender
{
    /*NSData *message = [[NSData alloc]init];
    [socket readDataToData:message  withTimeout:-1 tag:0];
    NSString *Str = [[NSString alloc] initWithData:message encoding:NSUTF8StringEncoding];
    NSUInteger len = [Str length];
    [self addText:[NSString stringWithFormat:@"客户端发送的信息:%@",Str]];
    NSLog(@"客户端发送的信息:%@,%lu",Str,len);
    [socket readDataWithTimeout:-1 tag:0];*/}
但是这两个没有接收数据啊  
didReadData接收到的是什么,是客户端发来的数据吗,还是有SOCDET的数据
我的那个函数可以用吗