File transfer using UDP protocol

Asked By 60 points N/A Posted on -
qa-featured

Hi everybody,

I expect somebody can assist me. I am attempting to assemble a client-server file transfer application. The client examines a file accumulate on a provided working location (PC) and throws it to a server which is installed on one more working location for additional practice. I am exercising UDP as the TP (transport protocol).

The difficulty is that my request works absolutely with files whose capacity is in the collection of kilobytes; on the other hand while I attempt to throw files whose size is in the series of megabytes, the request collapsed down and the attached error message explains.

I realized that I need to enlarge the volume of both the UDP transfer and receiver buffers; however I do not familiar how to perform this. If anybody has an idea how to perform this please let me know.

Thanks in advance.

LabVIEW: A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself.

Error 113 occurred at DP Write in TCP File Server.vi

Possible reasons(s):

LabVIEW: A message sent on a datagram socket was 

larger than the internal message buffer or some other 

network limit, or the buffer used to receive a datagram

was smaller than the datagram itself.

SHARE
Best Answer by Alice R Jones
Answered By 0 points N/A #134094

File transfer using UDP protocol

qa-featured

Hi Judith,

I have a solution to increase the volume of both the UDP transfer and receiver buffers, here:

1. Move your UDP-recv () loop to separate thread. Make sure this high priority thread only receives packets.

2. Then hand those packets to another thread for processing this will increase the buffer size.

Thanks,

Edward.

Best Answer
Best Answer
Answered By 0 points N/A #134095

File transfer using UDP protocol

qa-featured

Hello Judith,

You need to increase the size of UDP datagrams, but unfortunately it has a limit for Ethernet layers 1500 bytes approximate. An alternate solution is to send the data after splitting, but doing so does not guarantee successful data transfer since UDP does not provide a datagram transfer order, even those datagrams can be lost.

I would suggest to use the TCP protocol to transfer the files from client to server.

Alice

Related Questions