Writing Strings to Sockets - Program closed: WRS3948
| Fri, 2005-06-10 20:39 | |
|
I´m a very beginer with Symbian and I´m trying to modify the Nokia Sokets example to send
an string (TBuf8) via Sockets. When I try: TBuf8<2> buf; buf.Append('O'); buf.Append(EKeyLineFeed); iSocketsEngine->WriteL(buf); It works fine, but if I try: TBuf8<2> buf; buf.Append('O'); buf.Append('K'); buf.Append(EKeyLineFeed); iSocketsEngine->WriteL(buf); I get a "Program closed: SOCKETS" and then "Program closed: WRS3948" What this code means? ![]() Thanks in advance. |
|







Forum posts: 226
TBuf8<3> buf;
buf.Append('O');
buf.Append('K');
buf.Append(EKeyLineFeed);
iSocketsEngine->WriteL(buf);
Forum posts: 41
Appending 3 characters (O, K, Lf) causes a "buffer overflow", which pancis under Symbian
This easy-to-miss error, is the most common in application crashes. When you get a panic, always check your TBufs first! I guarantee you that's where it's coming from most the time
Forum posts: 33
if u don't know the size or u want allocate dynamically then use HBuf
Forum posts: 2
thanks for your help
[]´s
Forum posts: 14
A logical 0 bit exists of a high puls with a duration time of 600 µs followed by a low puls of 550 µs this. A logical 1 bit is formed by a high on time of 600 µs followed by low signal of 1600 µs.
Can i use this:
aBuf1.Copy( _L("\b00000011110000"));
iTxData.Copy(aBuf1); //TBuf8<160> iTxData;
iTxComm.Write(iTxStatus, iTxTimeOut, iTxData);Â // RComm& iTxComm;
Is it like the stream on the picture?
How to set the startbit and stopbit with the 1 logical and 0 logical like that?