]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/fwp/tests/fwp_prototest/fwp_sendrecv_test2.c
Implemented synchronous and asynchronous sending
[frescor/fwp.git] / fwp / lib / fwp / tests / fwp_prototest / fwp_sendrecv_test2.c
index 3e5c5b1d44f82730fe4737c103cf6c0b35683e0a..c42de6a0088e0ef3d5b1c2b3670fbe4559840608 100644 (file)
@@ -25,7 +25,7 @@ fwp_endpoint_attr_t  attr;
 
 void* receiver(void* arg)
 {
-       fwp_endpoint_t *repoint1;
+       struct fwp_endpoint *repoint1;
        int i,len;
        char buffer[30];
        fwp_addr_t from;
@@ -60,7 +60,7 @@ int main()
        struct fwp_vres_params vparam1, vparam2;
        char msg1[] = "Hello1";
        char msg2[] = "Hello2";
-       fwp_endpoint_t *sepoint1;
+       struct fwp_endpoint *sepoint1;
        pthread_t thread;
        
        vparam1.ac_id = FWP_AC_VO; 
@@ -97,9 +97,9 @@ int main()
        printf("Send endpoint 1 created\n");
        fwp_send_endpoint_bind(sepoint1, vres1);
        
-       fwp_send(sepoint1, msg1, sizeof(msg1));
+       fwp_send_sync(sepoint1, msg1, sizeof(msg1));
        printf("Sent msg1\n");
-       fwp_send(sepoint1, msg2, sizeof(msg2));
+       fwp_send_sync(sepoint1, msg2, sizeof(msg2));
        printf("Sent msg2\n");
        
        pthread_join(thread, (void**) NULL);