Networking Forums

Networking Forums > Computer Networking > Linux Networking > When windows client send a file (about 150kb) to linux server, after about 40kb is sent they are blocked.

Reply
Thread Tools Display Modes

When windows client send a file (about 150kb) to linux server, after about 40kb is sent they are blocked.

 
 
alones
Guest
Posts: n/a

 
      08-22-2007, 01:38 AM

I encounted a simlar problem like following problem (Unfortunately,
there was no answer...)
http://groups.google.com/group/comp....ad745605f2b5ac
Thoguth I myself found the solution, I could not understand it. So I
post this.

The problem is as followings,

* Windows client
step1. socket is crated with SOCK_STREAM, IPPROTO_TCP options
step2. connect()
step3. open a file which size is about 150kb
step4. send piece (255byte) of file in while loop (with 200 ms sleep)

* Linux server
step1. both listen and accept socket is created with SOCK_STREAM, 0
options
step2. bind, listen, accept (when window client connect)
step3. create file and write received piece of file from windows
client

* Result
Windows client rightly connected to linux server and began to send
piece of file to linux server.
But after sending 42075 byte, both client and server were blocked. -
_-;;

With same source code of both server and client, in case of window-
window, the file is successfuly transferred.

* Soluction
After windows client connect to linux server, I set SO_RCVBUF to
client socket (not SO_SNDBUF) as followings,
int tmp = 819200;
m_pChildSock->set_sockopt(SOL_SOCKET, SO_RCVBUF, (char*)&tmp,
sizeof(tmp));

As result, window client could successfuly send the file to linux
server.

¡Ø I tried to set SO_SNDBUF to socket, and after before window client
connect to linux server, change send/receive buff size of linux
server. and chang the sleep interval of client.
All of above try were failed.
And the size of received buff should bigger than the size of file to
send.

Why after set receive buff size to client socket, the transfer
succeed???

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC server on windows, linux client cannot connect Geico Caveman Linux Networking 0 09-14-2006 07:38 AM
TFTP server not receiving a file which sent on user defined port from windows client GS Linux Networking 1 07-13-2005 05:13 PM
Windows ntp server, Linux Client Brad Schroeder Linux Networking 3 08-11-2004 03:21 PM
Linux DNS Client Against Windows 2000 DNS Server Daniel Rigal Linux Networking 5 06-16-2004 02:24 PM
Samba file timestamp policy with Linux client .vs. Windows client Richard Conway Linux Networking 2 03-05-2004 07:49 AM



1 2 3 4 5 6 7 8 9 10 11