|
From: | Hugh Reynolds |
Subject: | Re: [lwip-users] Sending out TCP-Data as integer type |
Date: | Wed, 5 Dec 2012 21:05:57 -0000 |
What is sizeof(int) ? Regards Hugh From: address@hidden [mailto:address@hidden On Behalf Of Firedog I. Hi everyone, I got a little problem over here. I can send simple TCP-Data like string and char, but I can’t send data as integer type. I’m using lwIP v1.36 with RAW API. Example: /*Connection to Client established…*/ int data = "" //or int data = ""> tcp_write(pcb, data, 1, 1); tcp_output(pcb); When sending this Packet out, I receive a “00” as data in Wireshark. I’ve tried sending out the equal ASCII-char to 255, a “ΓΏ“ (see extended ASCII), and this one works. When sending out this char, Wireshark shows a TCP-Packet with 1 byte length and a "ff" as data. That’s exactly what I want, but I don’t want to convert integer vars into extended ascii and then send the converted data out. Any suggestions how to solve the problem? Thanks. |
[Prev in Thread] | Current Thread | [Next in Thread] |