Hi, I am trying to send out 20k plus worth of data over a client TCP connection.
Sending anything under the original 5840 buffer limit works no problem. I even increased that to 10k for other tests. Essentially as long as I send data out that is less than the buffer limit, then all is OK.
However I need to send large buffers out and have followed the documentation in that I use wip_write and if the result is less than then data I want to send, I wait for a WIP_CEV_WRITE event. However that event never gets fired. So I periodically tested for NWRITE parameter using wip_getOpts and am tracing it. One can clearly see that the send buffer is slowly being emptied until it is completely empty, but WIP_CEV_WRITE never gets fired. Additionally the SND_LOWAT is at a sensible limit of 1024, which is the point at which I expect to see the WIP_CEV_WRITE event to be fired.
Below is my trace, the first WIP_CEV_WRITE is fired as the channel is opened, but not later. The last trace repeats for a minute after which time I timeout and close the socket.
Does anyone have similar experiences or suggestions? I will now try and send the next lot based on the NWRITE value just to see if that works, however that feels like a cludge.
PS. I am using an FXT009 modem with the latest firmware (7.52) and version of Dev Studio (3.1)
Thanks,
Karl
12:04:17 1 ADL 2 WEB: Connecting to …...:12345: Result 403775832
12:04:17 1 ADL 2 WEB: Waiting for socket connection for Job103
12:04:18 1 ADL 2 WEB: WIPHandler 2
12:04:18 1 ADL 2 GetOpts: 0, KEEPALIVE: 0, SND_BUFSIZE: 5840,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 0,
NWRITE: 5840, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:18 2 ADL 2 WEB: Socket open and options set 0
12:04:18 3 ADL 2 WEB: Socket connected to host
12:04:18 2 ADL 2 WEB: WIPHandler 6
12:04:18 1 ADL 2 WEB: WIP_CEV_WRITE <=== Here the WIP_CEV_WRITE event is fired because the channel has just been opened.
12:04:18 2 ADL 2 WEB: Nothing to send
12:04:18 1 ADL 2 WEB: Trying connect to ……
12:04:18 1 ADL 2 WEB TX: 24074 bytes to host
12:04:18 1 ADL 2 GetOpts: 0, KEEPALIVE: 0, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 0,
NWRITE: 10240, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:18 2 ADL 2 WEB: Partial write completed.. 10240bytes
12:04:19 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 0, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:20 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 0, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:21 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 1368, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:22 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 2736, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:23 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 2736, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:24 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 4380, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:25 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 5748, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:26 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 5748, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:27 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 7128, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:28 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 8496, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:29 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 9864, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
12:04:30 1 ADL 2 GetOpts: 0, KEEPALIVE: 403705344, SND_BUFSIZE: 10240,RCV_BUFSIZE: 5840,SND_LOWAT: 1024,RCV_LOWAT: 1, NREAD: 14,
NWRITE: 10240, NODELAY: 0,MAXSEG: 1380,TOS: 0,TTL: 64,REXMT_MAX: 10,REXMT_MAXCNT: 3
<=== The above line continues for 1min, but where is the WIP_CEV_WRITE event?