|
If the buffer size is not hard coded, the process will have to retrieve one byte at a time from the socket and constantly resize the incoming buffer to accommodate the byte until the message has been received. That can be very time expensive.
What can be done is on the receive side, set up a hard coded buffer size. Each time a message is received, pass that buffer up to another method that will parse the buffer copying it into a second buffer. Then the original buffer is cleared. When the next message is received, the same process happens again. Let the parsing method determine when the message is complete and further processing of the completed message is necessary. This requires some analysis of the message and how it is structured so that the receiving process can put the message back together correctly.
There are many applications out there that do the second method effectively. In fact there are some examples on this web site of both methods.
Phil
|
|
|
|
|
I have been mia for the past few weeks but I am finally getting back to it. I understand the concept of your post but I am not really sure how to start implementing that. Would there be some sort of EOF char to determine the end of the message and then only pull out of the buffer up to that point. Would it be possible to maybe get me started on that. Thanks a lot
|
|
|
|
|
I'm beginner, with C#. I've learned basic language C# and Window forms.
Now, I want to build a application what allow create tasks list, appointments, to do list, calender...a desktop application run in system tray, show message at time that defined before...!
I used notify icon, contextmenustrip to minimize program into system tray...but I don't know how to continue develop program?
Somebody show me the way to go on, learn, reference articles or any books for my issues.
Thanks so much!
|
|
|
|
|
hanght wrote: I'm beginner, with C#. I've learned basic language C# and Window forms.
I think you should start a little smaller first.
only two letters away from being an asset
|
|
|
|
|
thanks for your idea! If you can, please give me a smaller project(I'll try it!)
I learned C,C++,VB(not API Programming)! I think I should learn more about system programming(as my project)(I've done a management application).
I hope will receive many your ideas...
|
|
|
|
|
Replacing windows calculator ( just the basic view ) is a good first C# project.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, Before strat to doing a small project please try to learn ADO.NET concept (if u dont have) , coz, for any project you have to use database.... and the application you want to build will need database to maintain records....
Good luck !!!
Happy Programming
-----
Abhijit
|
|
|
|
|
hi there,
i m trying to set background image of picture box by texture that will be filled by textureloader
but i have a problem that when i m trying to load texture its giving error
that is "Error in application"
codes :
private Texture texture;
private Device gDevice;
...........................
...........................
texture = TextureLoader.FromFile(gDevice, @"C:\asasa.ddt", 256, 256, 0, Usage.Dynamic, Format.Dxt3, Pool.Default, Filter.None, Filter.None, 0);
any idea to solve the problem?
Becoming Programmer...
|
|
|
|
|
It might be helpful to include the error you are getting
only two letters away from being an asset
|
|
|
|
|
"Direct3DXException was unhandled"
Becoming Programmer...
|
|
|
|
|
xmen_xwk wrote: "Direct3DXException was unhandled"
So you're doing Direct3D development but you don't know that you should be posting the contents of the exception in order to receive help. I think you are missing some fundamental aspects of software development while proceeding to a somewhat advanced topic.
|
|
|
|
|
|
|
hahaha, i just wrote what i m getting by VC#
Becoming Programmer...
|
|
|
|
|
Have you tried the view details link on the exception dialog? That should give you more details, including a stack trace that help to narrow your problem.
only two letters away from being an asset
|
|
|
|
|
|
Can i use Lambda Expressions in C# 2.0?
|
|
|
|
|
No. C# 2 doesn't provide lambda expressions, C# 3 does however. You can use a more verbose form of a lambda, an anonymous method, in C# 2.
public void DoSomething()
{
int someLocal = 7;
MethodInvoker anonymousMethod = delegate
{
MessageBox.Show(someLocal.ToString());
};
}
|
|
|
|
|
Hi,
I have come across a big problem.I have developed my application in C# just a few days before and today when I when searching the internet I found some software like ".NET Decompiler" . I wondered that how is it possible ? Then when I downloaded it any opened my executable it it, With my wonder the whole exe was converted to a full formated source code !! I was just too much shocked seeing all this ! What's it ? Any problem in .NET Complier method or what ? How can an exe be converted to source code ? Anyone PLEASE HELP...
Thanks,
Dan.
|
|
|
|
|
|
That's how it is in the .Net world.
It gives advantages like the cool features available in reflection but unfortunately it exposes the inner workings of your code to the outside world. You could try using an obfuscater to make your source less readable.
Russ
|
|
|
|
|
Dan`M wrote: I have come across a big problem.I have developed my application in C# just a few days before and today when I when searching the internet I found some software like ".NET Decompiler" . I wondered that how is it possible ? Then when I downloaded it any opened my executable it it, With my wonder the whole exe was converted to a full formated source code !! I was just too much shocked seeing all this ! What's it ? Any problem in .NET Complier method or what ? How can an exe be converted to source code ? Anyone PLEASE HELP...
The .net compiler includes a lot of information in the executeables for debugging purposes. If you don't want your code to be easily read, you need a .net obfuscator. I think one is included with VS2005.
Nathan
|
|
|
|
|
|
Neither .NET or legacy VB are safe against decompiling - it's just more obvious in the case of .NET.
A compiler converts your program from human readable source code to something the computer can easily execute. This is done to help the computer execute your program more efficient - it is not something you do to hide your source code, so you should not be surprised the code is still accesible after compilation.
.NET (and Java for that matter) compiles to a "higher level" than the old VB and C++ compilers and it carries more metadata on the program (method names etc) that makes decompiling them easier than for example C++ and VB programs. Decompiling VB and C++ is still possible however (but obviously not with a program designed to decompile .NET code), so you should NEVER rely on your code not being decompiled as "security".
With regards to security in general, maybe you should for a split second consider that it's not all about the programmer. It's obviously more secure for the user to run a program that has proper metadata to allow the runtime to verify what is going on - Running a program that deliberately try to hide what it is doing can be called a lot of things, secure isn't one of them.
And experienced programmers know there is nothing exceptional clever in their code anyway, so why try to hide it?
|
|
|
|
|
lmoelleb wrote: And experienced programmers know there is nothing exceptional clever in their code anyway, so why try to hide it?
Ya.. that's true sprit of programming. No matter if the app has secure coding .
Anyway , best wishes for programming from me.
Thanks,
Dan
|
|
|
|