You need to sign in or sign up before continuing.
Commit 402105da authored by Samarth Joshi's avatar Samarth Joshi

Removing commented code

parent 2a0b2d19
No preview for this file type
...@@ -14,21 +14,7 @@ client library interfaces to do the actual operations. ...@@ -14,21 +14,7 @@ client library interfaces to do the actual operations.
#define SA struct sockaddr #define SA struct sockaddr
#include "KVClientLibrary.c" #include "KVClientLibrary.c"
struct message* requestMessage; struct message* requestMessage;
void func(int sockfd,struct message* requestMessage)
{
char buff[MAX];
int n=0;
for (;;) {
bzero(buff, sizeof(buff));
if(1)
{
n++;
printf("[Message sent to server]\n[[Status:%c]\n[Key:%s]\n[Value:%s]]\n",requestMessage->status,requestMessage->key,requestMessage->value);
write(sockfd, requestMessage, sizeof(struct message));
sleep(2);
}
}
}
int main(int argc, char const *argv[]) int main(int argc, char const *argv[])
{ {
int sock = 0, valread; int sock = 0, valread;
...@@ -59,9 +45,12 @@ int main(int argc, char const *argv[]) ...@@ -59,9 +45,12 @@ int main(int argc, char const *argv[])
char key[256]="abc"; char key[256]="abc";
char value[256]="cde"; char value[256]="cde";
char error[256]; char error[256];
printf("%d",(int)put(sock,key, value,error)); //printf("%d",(int)put(sock,key, value,error));
printf("%d",(int)del(sock,key,error)); //printf("%d",(int)del(sock,key,error));
printf("%d",(int)get(sock,key, value,error)); //printf("%d",(int)get(sock,key, value,error));
while (1) {
printf("%d",(int)put(sock, key, value, error));
}
return 0; return 0;
} }
\ No newline at end of file
No preview for this file type
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment