Sockets - send()
Nancy Palmquist
nlp at vss3.com
Thu Oct 30 15:02:31 PDT 2008
Anyone using the sockets logic in filePro, I was wondering if anyone had an idea
about this.
I am sending data from a Windows XP using filepro to a Linux system using filepro.
The linux system is acting like the socket server and is waiting for a file.
The file max size is 4000.
I am making a connection, and issuing the commands:
rx(4000)=Outfile
status=send(handle2,rx)
The status value will be "4000" when I do it like shown.
status=send(handle2,rx{"")
The status value will be "1990" when I do it without the padding.
On the Linux side, I have a command:
rx(4000)=""
length=recv(accept_handle,rx)
If I display the value of LENGTH, it will show "1490" and I am missing the end
of my file.
I have in one run where I am sending 4 records one at a time that are all the
same length to the Linux box, I have gotten 4000 bytes for the first, 4000 bytes
for the second then 1490 for the third and forth.
This is on the same run, without stopping the server or changing anything.
I need the entire file to be sent, and I guess I will have to try to reprogram
this to send chunks that are smaller to make sure it works.
I have done this before with larger files and have had no issues but I was going
from Unix to Windows. Is there a Windows to Unix/Linux difference or something
like that I am fighting?
BTW - I tried added the length ("4000")to the send command and I got an error
-10045 from the socket, which seems to mean incorrect syntax. I assumed it was
an expression, and quoted it.
Any suggestions would be helpful. All the records that are smaller than 1490
seem to work flawlessly.
Thanks for suggestions.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list