hi everyone
am trying to compile a simple server-client connection program in C. but the client can't found the server...i gave my localhost adress to client. can any body help to find out what s wrong?
the source code of both server and client are given below:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdio.h>

#define NSTRS 3 /* no. of strings */
#define ADDRESS "127.0.1.1" /* addr to connect */

/*
* Strings we send to the server.
*/
char *strs[NSTRS] = {
"This is the first string from the client.\n",
"This is the second string from the client.\n",
"This is the third string from the client.\n"
};

main()
{
char c;
FILE *fp;
register int i, s, len;
struct sockaddr_un saun;

if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
perror("client: socket");
exit(1);
}

saun.sun_family = AF_UNIX;
strcpy(saun.sun_path, ADDRESS);
len = sizeof(saun.sun_family) + strlen(saun.sun_path);

if (connect(s, &saun, len) < 0) {
perror("client: connect");
exit(1);
}

fp = fdopen(s, "r");

for (i = 0; i < NSTRS; i++) {
while ((c = fgetc(fp)) != EOF) {
putchar(c);

if (c == '\n')
break;
}
}
for (i = 0; i < NSTRS; i++)
send(s, strs[i], strlen(strs[i]), 0);
close(s);

exit(0);
}
/***************** SERVER *************************************/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdio.h>

#define NSTRS 3 /* no. of strings */
#define ADDRESS "mysocket" /* addr to connect */

/*
* Strings we send to the client.
*/
char *strs[NSTRS] = {
"This is the first string from the server.\n",
"This is the second string from the server.\n",
"This is the third string from the server.\n"
};

main()
{
char c;
FILE *fp;
int fromlen;
register int i, s, ns, len;
struct sockaddr_un saun, fsaun;
if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
perror("server: socket");
exit(1);
}

/*
* Create the address we will be binding to.
*/
saun.sun_family = AF_UNIX;
strcpy(saun.sun_path, ADDRESS);

unlink(ADDRESS);
len = sizeof(saun.sun_family) + strlen(saun.sun_path);

if (bind(s, &saun, len) < 0) {
perror("server: bind");
exit(1);
}

if (listen(s, 5) < 0) {
perror("server: listen");
exit(1);
}
if ((ns = accept(s, &fsaun, &fromlen)) < 0) {
perror("server: accept");
exit(1);
}

/*
* We'll use stdio for reading the socket.
*/
fp = fdopen(ns, "r");

/*
* First we send some strings to the client.
*/
for (i = 0; i < NSTRS; i++)
send(ns, strs[i], strlen(strs[i]), 0);

/*
* Then we read some strings from the client and
* print them out.
*/
for (i = 0; i < NSTRS; i++) {
while ((c = fgetc(fp)) != EOF) {
putchar(c);

if (c == '\n')
break;
}
}
close(s);

exit(0);
}


THANKS IN ADVANCE