• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

Visual Basic WInsock Api..... "recv" is receiving zero bytes and zero data from my server..... the send works good!

IN a Visual Basic 6.0, Winsock API I was able to connect and send data to the server...... But my "recv" statement is getting zero data back from the server and zero bytes back! I was able to talk the server analyst and he verified that he was getting my request in and sending back data. But my "recv" couldn't see the data sent back! Any ideas? I verified the arguments in the "recv" and the data types.

Thanks

  Dim nFlags As Long
  Dim getData As String
  Dim ictr As Long
  ' s is an integer set with proper socket id
  nFlags = 0
 
  dwBytes = recv(s, ByVal getData, Len(getData), nFlags)
0
synrdyne
Asked:
synrdyne
  • 3
1 Solution
 
RajmafiaCommented:
By the way how r u passing ur data? is it just a string message or from some kind of database??? it really matters how u r passing over/getting back. In some cases, it might NOT be the same.. Be specific a bit. maybe i could help u..
0
 
synrdyneAuthor Commented:
Thank you for your interest. I found that my recv buf area was defined correctly. I needed to give it a large allotment. Rick
0
 
synrdyneAuthor Commented:
Thank you for your interest. I found that my recv buf area was defined IN-correctly. I needed to give it a large allotment. Rick
0
 
synrdyneAuthor Commented:
Here it is.
Thanks
Rick

RetMsg = String(1000, 0)
   dwRc = recv(s, ByVal RetMsg, 1000, 0)
0
 
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->PAQ - with points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now