Well for starters, your indentation is horrible. Next, main returns an int, so stop with the "implicit int" stuff. Is it that hard to type three characters?
Code:
int buffsize=1024; /* Why aren't you using BUFSIZ? */
char *recvd = malloc(buffsize);
char *msg = malloc(buffsize);
...snip...
//while (1)
//{
printf("Client says %s\n", &recvd); /* This is wrong. Lose the address-of. */
//break;
// }
...snip...
scanf("%s", &msg); /* This is wrong. address-of isn't for pointers. Just use its name. */
...snip...
int buffsize=1024; /* Why are you declaring another of these? */
int buffsize1=1024;
char *msgn = malloc(buffsize);
char *msg= malloc(buffsize1);
while (1)
{
//scanf("%s", &msg); /* This is wrong. */
msg = "hello world\n\r";
if(send (sock,msg, buffsize1,0)==-1)
...snip...
printf("Server says: %s\n", &msgn); /* This is wrong. Lose the address-of. */
That'll do for a start.
Quzah.