why daytime don't work?

Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows:

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFFSIZE 150
int main(){
  struct sockaddr_in serv;
  char buff[BUFFSIZE];
  int sockfd,n;
  if((sockfd=socket(PF_INET,SOCK_DGRAM,0))<0)
     err_sys("socket error");
  bzero((char *)&serv,sizeof(serv));
  serv.sin_family=AF_INET;
  serv.sin_addr.s_addr=inet_addr("10.10.10.9");
  serv.sin_port=htons(13);
  if(sendto(sockfd,buff,BUFFSIZE,0,(struct sockaddr *)&serv,sizeof(serv))!=BUFFSIZE)
     err_sys("sendto error");
  if((n=recvfrom(sockfd,buff,BUFFSIZE,0,(struct sockaddr *)NULL,(int *)NULL))<2)
     err_sys("recvfrom error");
  buff[n-2]=0;
  printf("%s\n",buff);
}

$a.out
aa --here I input a line

I can't get any information from daytime, the code is under the same machine '10.10.10.0". Why I can't get information of daytime?

Thanks

Is 10.10.10.9 your NTP server?

Jim, I believe that Konvalo is asking about the daytime service as in RFC 867 rather than Network Time Protocol.

Konvalo, is your daytime service set up as TCP/IP or UDP? What is the output if you do the following?

telnet 10.10.10.9 13