hi everyone
i have got an error message connection error while running the below code, please some one correct the code

server:


#include<sys/types.h>
#include<sys/socket.h>
#include<fcntl.h>
#include<netinet/in.h>
#include<stdio.h>
#include<arpa/inet.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int sid,b;
int c,t;
struct sockaddr_in server,client;
sid=socket(AF_INET,SOCK_STREAM,0);
if(sid<0)
{
printf("sockerr%d",sid);
exit(0);
}
bzero(&server,sizeof(struct sockaddr_in));
server.sin_family=AF_INET;
server.sin_addr.s_addr=INADDR_ANY;
server.sin_port=htons(3600);
c=sizeof(&server);
bind(sid,(struct sockaddr*) &server,c);
t=listen(sid,1);
if(t<0)
{
printf("Listenerr%d",t);
exit(0);
}
c=sizeof(client);
t=accept(sid,(struct sockaddr *) &client,&c);
if(t<0)
{
printf("accerr%d",t);
exit(0);
}
printf("portno%u",client.sin_port);
close(sid);
return(0);
}

client:

#include<sys/types.h>
#include<sys/socket.h>
#include<fcntl.h>
#include<netinet/in.h>
#include<stdio.h>
#include<arpa/inet.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int sid,b;
int c,t;
struct sockaddr_in server;
sid=socket(AF_INET,SOCK_STREAM,0);
if(sid<0)
{
write(1,"sockerr",7);
exit(0);
}
bzero(&server,sizeof(struct sockaddr_in));
server.sin_family=AF_INET;
server.sin_addr.s_addr=INADDR_ANY;
// inet_aton("192.168.1.2",&server.sin_addr);
server.sin_port=htons(3600);
t=connect(sid,(struct sockaddr *) &server,sizeof(&server));
if(t<0)
{
printf("conner%d",t);
// write(1,"conner",6);
exit(0);
}
close(sid);
return(0);
}