Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Socket Send seems to clear data after 255 bytes

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
0
0
US
In Socket programming in .net, the "Send" command doesn't take a string as the data to send. But apparently, in VBA it does.

In the code, I was looking at this week we had string that was 366 bytes and we added a 4 bytes onto that making it 370. The 4 bytes was something like "abcd"

The code was something like:

Dim ParameterList As String

...

Send(ParameterList)

When we looked at ParameterList before the send, it had 370 bytes, including the 4 characters we sent.

I then looked at the .net side which received the code which received the data in a byte array and it said it recieved the 370 bytes but when I looked at the data the last 4 charaters "abcd" was not there.

However, the charcters at position 111 - 120 was there.

The only thing I can figure is that somewhere in the send and receive the data is getting blank filled after 255. But not sure why.

I thought that maybe there was some type of string limitation in VBA but the data was there at 367-370 when I sent it.

Anyone know what could be happening.

Thanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top