Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Send long String with TCPWRITESTR or TCPWRITE

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP
View previous topic :: View next topic  
Author Message
katipefendi

Bascom Member



Joined: 24 Oct 2013
Posts: 30

blank.gif
PostPosted: Tue Jul 03, 2018 11:03 pm    Post subject: Send long String with TCPWRITESTR or TCPWRITE Reply with quote

Hello

how can i send a long string with TCPWRITESTR or TCPWRITE

thanx in advance
sinan
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5916
Location: Holland

blank.gif
PostPosted: Wed Jul 04, 2018 9:05 am    Post subject: Reply with quote

how long is the string?
_________________
Mark
Back to top
View user's profile Visit poster's website
katipefendi

Bascom Member



Joined: 24 Oct 2013
Posts: 30

blank.gif
PostPosted: Wed Jul 04, 2018 1:28 pm    Post subject: Reply with quote

5000 charakters
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5916
Location: Holland

blank.gif
PostPosted: Thu Jul 05, 2018 9:19 am    Post subject: Reply with quote

tcpwritestr can only handle normal strings.
this means you need to use tcpwrite and send the CR+LF yourself.
when your data is bigger than the socket size, you need to break it up.
So say your data is actual 5000 bytes, and the socket write size is 2048 bytes, you send chunks of 2048. Just use an offset.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum