From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6134,641b66eed0ae294e,start X-Google-Attributes: gidf6134,public X-Google-Thread: 1164f8,641b66eed0ae294e,start X-Google-Attributes: gid1164f8,public X-Google-Thread: ffe3b,641b66eed0ae294e,start X-Google-Attributes: gidffe3b,public X-Google-ArrivalTime: 1993-09-23 13:24:00 PST Xref: gmd.de comp.org.decus:1606 comp.sys.dec:10303 vmsnet.networks.desktop.pathworks:6351 Newsgroups: comp.org.decus,comp.sys.dec,vmsnet.networks.desktop.pathworks Path: gmd.de!xlink.net!howland.reston.ans.net!agate!doc.ic.ac.uk!uknet!bnr.co.uk!bnrgate!nott!torn!govonca!loxtonr From: loxtonr@govonca.gov.on.ca (Ron Loxton) Subject: Task-to-Task communications Message-ID: <1993Sep23.191639.2073@govonca.gov.on.ca> Organization: Government of Ontario Date: Thu, 23 Sep 1993 19:16:39 GMT Netters: I am attempting to perform task-to-task communication between a Vax running Pathworks V4.1 and my PC over decnet. I can send data from the VAX task to my PC task but not the other way (I get a symbolic stack dump). Any help would be appreciated. Please mail any suggestions to me personally loxtonr@gov.on.ca Thx Ron Loxton ============================================= Server Source: #include FILE *TaskConnection; char *pInputBuffer; main() { if ((TaskConnection = fopen("SYS$NET","r+")) == NULL) /* Open for read+write */ { puts("Cannot open network connection"); exit(1); } puts("Connection openned"); if (fputs("Hello There...",TaskConnection) == EOF) { puts("Connection has been closed"); return(-1); } puts("Data Sent"); puts("Waiting for Data from client..."); if(fgets(pInputBuffer,100,TaskConnection)== NULL) { puts("Error Reading Line"); } puts("Data Received..."); printf("Received: %s",pInputBuffer); /* Close connection */ fclose(TaskConnection); puts("Connection closed\n\n"); } ============================================= Task Source: #define DEBUG 1 #include #include #include "d:\dev\dneth\types.h" #include "d:\dev\dneth\dnfundef.h" #include "d:\dev\dneth\dn.h" #include "d:\dev\dneth\socket.h" int main() { char *pNodeName, *pBufferAddress; int iSocketNumber, iBufferSize; if ((pNodeName = getnodename()) != NULL) { printf("\nNode Name: %s\n",pNodeName); } else { puts("No Local Node Name Returned..."); puts("Please contact systems officer."); return(1); } // Connect to TEST.EXE on remote node if ((iSocketNumber = dnet_conn("nrnwpr/username/password","test.exe",1,NULL,0,NULL,0)) != -1) { #ifdef DEBUG puts("Socket Openned...\n"); printf("Socket Number: %i\n",iSocketNumber); #endif } else { puts("Unable to create socket\n"); return(-1); } // Read from TEST.EXE sread(iSocketNumber,pBufferAddress,iBufferSize); #ifdef DEBUG printf("Received %s\n",pBufferAddress); #endif // Write to TEST.EXE strcpy(pBufferAddress,"Hello from Ron"); send(iSocketNumber,pBufferAddress,strlen(pBufferAddress),0); #ifdef DEBUG printf("\nSent %s\n",pBufferAddress); printf("\nSize: %i",strlen(pBufferAddress)); #endif // Close Socket if (sclose(iSocketNumber) == 0) { #ifdef DEBUG puts("\nSocket Closed...\n\n"); #endif } else { puts("Unable to close scoket...\n\n"); return(-1); } return(0); }