|
What I meant to ask was how would you go about creating your own protocol so the client knew what type of message it was recieving (could be text or other type of data). Also would it be ok to create 2 seperate sockets, one for sending and one for recieving?
Thankyou
|
|
|
|
|
u can follow the generic format ie.
____________________________
command |length |data |CRC |
-------------------------------------
if you are sending as string separate each with a spl char. like "$".
or if it is byte array, convert the formated string to byte array using this
ASCIIEncoding.GetBytes(stringpkt)
qn#2 it is ok to send it as 2 packets, as long as you have identity for packets & also the client must understand ur protocol format. eg. you can maintain one field on the packet to identify "Packet is over or not", if not over, client will listen for rest of the packets
regards,
Srini
modified on Wednesday, February 13, 2008 10:12 PM
|
|
|
|
|
|
Wrong forum?
SkyWalker
|
|
|
|
|
How can I retrive particular column data from Dataset?
when I write the " mydataset.tables[0].columns[0][0] " line
in watch windows It works properly
but
I can't use this solution in my program .it doesn't work . I don't know why.
|
|
|
|
|
YourDataSet.Tables[0].Rows[0][0]
SkyWalker
|
|
|
|
|
thank you so much
|
|
|
|
|
Hi,
In my appplication i have requirement to use two ListViews :-lvAvailList (has the Available Items) and lvSelList (has the selected items),the View of ListViews is set to Details and the ListViews has two columns.
In my form i have a listbox,the multiselection property of the listbox is set to true.
say the listbox is populated with items :For example
1.Fruits
2.Vegetables
3. Books
When ever the user changes selection on the listbox,the lvAvailList has to be populated with coresponding items.
For Exmple:
If Fruits and Vegetables are selected in the ListBox,then the lvAvailList has to be populated with items
Col1(Type) Col2(Sub Type)
Fruits Apple
Fruits Grapes
Fruits Banana
Vegetables Potato
Vegetables Onion
Now if the user selects Fruits and Books in the ListBox,then the lvAvailList has to be populated with items
Col1(Type) Col2(Sub Type)
Fruits Apple
Fruits Grapes
Fruits Banana
Books C
Books C++
While adding items to the lvAvailList , we need to check if the items is already in the lvSelList (user can select an item in lvAvailList and move it to the lvSelList), if so item should not be added to the lvAvailList.
Since with the ListView the loading was slow and huge number of records have to be populated in ListViews (in actual senario up to 64k),i tried using the FastListView and the result great increase in performance !!!.Thanks for such a nice control.
1.Is using the FastListView appropriate in this case??
2.If using the FastListView is appropriate,how can i sort the items in the FastListView columns by the item Tag.
Thanks and Regards
Vinutha
Vinutha
|
|
|
|
|
HI ALL,
Now I am facing a problem with webservice callback.We called a webmethod asynchronously from a webpage.Then the page will be rendered from the server to the client,but the result of the called method may be reaches the webservice after rendering the site.So the webservice become not able to send the result to webform.My question is how to inform the webform asynchronously without polling for its completion and too much delay?
Plz Help................
|
|
|
|
|
The partial-page rendering might be of help.
Have a look here[^]
Is this not the wrong forum ?
SkyWalker
|
|
|
|
|
Hi All,
So I have developed a custom control, nice it is, that derives from Panel (which derives from ScrollableControl). All is looking quite good, but the whole control flickers when resized.
My OnPaint handler only redraws what's in the ClipRectangle to try an keep performance up, but the problem it seems is that when resizing the ClipRectangle I get is always the size of the whole control eg. (0, 0, 600, 400) so the whole thing is redrawn. I'd expect that when the control size is increased, the ClipRectangle would be just the area which becomes visible as a result. I'd expect something like (600, 0, 700, 400) when widening the control. Infact I've seen it work like this before.
I've tried playing around with ControlStyles including the ResizeRedraw but I can't change the behaviour. Can anyone shed any light on why this might be happening?
Thanks.
Regards,
Rob Philpott.
|
|
|
|
|
to avoid flickering, you should probably make use of double-buffering.
Example: here[^];
Other comments: here[^].
SkyWalker
|
|
|
|
|
Indeed. Thanks for the reply.
I've put that in and everything draws really nicely now but I'm still unhappy that the whole control is 'repainted' needlessly, especially as I've put quite a bit of effort in to work out what does and does not need painting.
Regards,
Rob Philpott.
|
|
|
|
|
Then you could try using AControl.SuspendLayout() in the ResizeBegin event handler, and AControl.ResumeLayout in the ResizeEnd event handler of your form.
SkyWalker
|
|
|
|
|
Hi
I select a camera Pixord 205 for live view through VLC.But the camera is not connected.How can i know the camera is not connected
Thanks in Advance
Smithakrishnan
|
|
|
|
|
Is there any CNG compnents available for windows XP ?
please provide me some of links !!!
Thanks in Advance !!!
|
|
|
|
|
I really appreciate your assist and help.
I would like to convert 24bppRgb to 8bppIndexed in c# but i get an exception as out fo memory.the code is
Bitmap img = new Bitmap("c:\sky.jpg");
Bitmap bm = img.clone(new Rectangle(0,0,img.width, img.height),PixelFormat.Format8bppIndexed);
please help me to do it.
Abdul Rahman Hamidy From Afghanistan
|
|
|
|
|
Are you doing this inside a loop and not disposing of the bitmap?
|
|
|
|
|
I really appreciate you.
no plz i am doing it outside the loop
Abdul Rahaman Hamidy
Senior Student Student in Computer Science, Kabul, Afghanistan
Interesed in Software Development
|
|
|
|
|
Hello,
As "Ed.Poore" just said, you really should use Dispose or a using-block to free your GDI objects!
But this is not causing the exception.
It's also not that you are Out of bounds, which could also lead to this exception (seen in the msdn docu[^])
I think that the underlying problem is, that it's not possible to create an Graphics object from an bitmap with this PixelFormat.
Can be seen here:
using(Bitmap img = new Bitmap(@"c:\sky.bmp"))
using(Bitmap bm = Clone(img, PixelFormat.Format8bppIndexed))
{
}
public static Bitmap Clone( Bitmap source, PixelFormat format )
{
int width = source.Width;
int height = source.Height;
Bitmap bitmap = new Bitmap( width, height, format );
using(Graphics g = Graphics.FromImage( bitmap ))
{
g.DrawImage( source, 0, 0, width, height );
}
return bitmap;
}
I'm sure the articles from "Christian Graus", about "Image Processing" will help you.
Look here![^]
All the best,
Martin
|
|
|
|
|
I really appreciate your help
the code which you have send it, throws an exception and i didnt find any solution for this code
Abdul Rahaman Hamidy
Senior Student Student in Computer Science, Kabul, Afghanistan
Interesed in Software Development
|
|
|
|
|
Abdul Rahman Hamidy wrote: the code which you have send it, throws an exception
Like I told you in my post!
Abdul Rahman Hamidy wrote: and i didnt find any solution for this code
Have you had a look at the articles from "Christian Graus"?
All the best,
Martin
|
|
|
|
|
Hey, my Austrian friend, glad to see you after a while.
Congrats on the MVP award, and how are you doing?
Cheers,
Vikram.
"The weak can never forgive. Forgiveness is the attribute of the strong." - Mahatma Gandhi.
|
|
|
|
|
Vikram A Punathambekar wrote: Hey, my Austrian friend,
Hello Vikram!
Vikram A Punathambekar wrote: glad to see you after a while.
Thank's
Due to some changes that are going on at the company I'm working for, I'm very very busy write now.
It's a shame that I'm not able to do more for the comunity.
Vikram A Punathambekar wrote: Congrats on the MVP award
Thank you!
That was a real surprise for me, and I'm not sure if I deserve it (not fishing for compliments).
Vikram A Punathambekar wrote: and how are you doing?
Apart from the working thing, I'm doing quite well, thanks for asking.
Hope you are also doing well.
All the best,
Martin
|
|
|
|
|
Hi,When I use in sockets "return System.Text.Encoding.ASCII.GetString(buffReceiveData);"
It returns a-z,A-Z and 0-9 and some special characters also, But the German characters such as Ä are lost
Can any one help me to sort out this issue.
Jamman
|
|
|
|