|
Scott, I don't know if you saw my original post, listing the apis we are calling so I'll post them here again. This code works well for other socket connections, but this is the first time we've connected with a server that is handing off the connection so I wasn't sure if there was a piece I was missing. I'm glad to hear you say that the handoff is invisible to the client, because thats the way i understood it to be also. I just noticed we are doing a WRITE instead of a SEND (but our programmer says she's tried it both ways and neither works). Heres what we run: Create a socket descriptor for the server process to bind. EVAL SrvrSktId = Socket(AF_INET :SOCK_STREAM :0) ** Set socket descriptor to be reuseable. c EVAL RtnCd = SetSockOpt(SrvrSktId C :SOL_SOCKET C :SOL_REUSEADDR C :%ADDR(On) C :%SIZE(On)) * Connect to the server C Eval RtnCd = Connect(SrvrSktId: C %Addr(ServerAddr) : C %Size(ServerAddr) ) C EVAL svaddrlen = %SIZE(serveraddr) C IF NOT *IN68 C EVAL RtnCd2 = Write(SrvrSktId C :%ADD Here's what the vendor told us to do: Looking at what should be done at CPU's side, the logic should be: // Create an unconnected socket for TCP/IP m_Sockfd = ::socket(AF_INET, SOCK_STREAM, 0); // Connect to serv_addr (207.230.238.11, 5550) and // set m_Sockfd to some unique value (e.g., 34567) connect(m_Sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); // Send messages to 34567 send(m_Sockfd, outBuffer, ::strlen(outBuffer), 0) Presumably, they'll be using the above calls (BSD sockets API). Ron Hawkins
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.