Socket Help in C

I'm trying to read 16 bytes of data from a serial port device and send that via a TCP socket connection.

The code works when the data size is between 1 and 5 bytes, but anything larger than that only allows 5 bytes through.

What am I doing wrong? I checked the serial device by printing byte by byte the output using the same settings as in this code, and it worked fine - so I know the serial settings and device are working correctly.

Is there a flaw in my TCP socket code? I know the buffers are all strange, that's why I specified the length of data to always be 16.

Please help me figure this out, it's driving me crazy!

http://www.vectrasoft.net
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories