Go to Post I've always believed that being who I was will not limit me to who I will be. That's what keeps me trying to learn more and become a better person. Otherwise I would've settled being someone ordinary and not care about anything around my life. - Ken Leung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 20-11-2013, 09:18
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: TCP problems in C#

Thank you guys for the replies!

I have to admit, I'm just learning TCP so please excuse any noob-ish mistakes I've made:/

Quote:
What you're calling the "server" is apparently sending data continuously, and what you're calling the "client" is apparently reading the accumulated data once every 20 milliseconds. Is that the intent?

Normally, I'd expect the client to send a packet of data either on a fixed schedule or whenever the data is available, and the server would wait for data to appear before reading it and processing it immediately.
That is the intent, yes. On the LV program, I was following a simple tutorial to write the string; do you have any tips on how I could accomplish what you've described?

Quote:
TCP is a stream protocol and guarantees that things will be received in the correct order, but they may be packetized differently then you expect. You can learn more by searching for nagle algorithm.

Why are you sending data with no delay in LabVIEW, but reading data every 20ms? You'll probably fill up the TCP/IP buffers fairly quickly.
I'm not sure I completely understand. Are you saying that, because I'm using LV to write and C# to read, there's a discrepancy in the packet order? And I didn't really pay attention to it, I was following a tutorial . Would it just be a ms timer in the loop?

Quote:
The code you have is extracting data from rData formatted as a string, where rData is the number of characters read from the socket stream. The actual data read from the stream is stored in info, which you aren't currently using
Oh, dangit. Careless mistake, haha. Fixed!


Do you guys think the problem is on the LV side or the C# side?
__________________
Per Audacia Ad Astra

Last edited by Invictus3593 : 20-11-2013 at 09:20.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi