|
Begin Receive contains a similar overload as receive. The logic is the exact same, except in the callback method you must call BeginRecieve again after reading all of the bytes.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
so just for clearification the code would be something like this:
int size = socket.EndReceive(iasyncresult);
while(size > 0)
socket.BeginReceive(...);
|
|
|
|
|
no. read the MSDN.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
ok. Thanks for your help
|
|
|
|
|
If anybody is looking for the answer, do check this link [^] out.
Also, be careful with the ReceiveTimeouts. ReceiveTimeout is for synchrounous receive only. So, if you don't want your loop to get stuck, make sure you include some way of identifying the end of message.
Good Luck,
Prateek
|
|
|
|
|
I am currently writing UDP socket class to control a device. I created a class that has a UDP socket. I have blocking function that I uses the socket to transmit a packet to the device. The function than needs receieve the response packet/packets from devices. However, if no valid response is not recieved in x period of millisecond the function needs to timeout. I am having difficulties creating a way to calculate millisecond periods. In the past i use to use GetTickCount(); How do i accomplish this i C#
Scott
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
|
Create a timer and use the following event:
int tickCount = 0;
void timer1_Tick(object sender, EventArgs e) {
tickCount = tickCount + 1;
}
I haven't tested the code out, but it should work. Hope this helps
Prateek
|
|
|
|
|
The .net timers are not all equal and do not all perform as you might expect, especially in terms of resolution. Luc Pattyn has a great article on timers here[^] that may help - if not, it's a good read anyway
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
wow, i didn't know that. Thanks for sharing
|
|
|
|
|
Is there a tool that could statically check my code and flag any problems with my CER code?
My LinkedIn Profile
|
|
|
|
|
hosamaly wrote: my CER code
Huh? Do you mean CLR? You could always take a look at FxCop, though it is more for checking coding standards.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
No, I mean CER: Constrained Execution Region.
Thanks for your reply anyway.
My LinkedIn Profile
|
|
|
|
|
Thanks for the clarity. Not very familiar with CER. Good luck to you
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
Unfortunately, there isn't. Sorry.
|
|
|
|
|
So sad
Thanks anyway
I would be grateful if you could link me to a checklist of some sort...
Thanks again
My LinkedIn Profile
|
|
|
|
|
I have one small quesion on how to use accelated key on a button:
I have one 'OK' button in a Dialog, I want to press the 'return' key to replace the function of clickint OK button,how to do?
thanks
|
|
|
|
|
In winforms, set it as the accept button.
It's a property on the form called "AcceptButton", just change it to the button you want to be the default accept button.
Simon
|
|
|
|
|
In addition to what Simon said, have a look at setting the DialogResult property for your buttons so you can get a result when the dialog returns.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi Guys,
I am doing an application that deals with zip and unzip and am using j# libraries vjslib.dll which work really great on my machine but when deployed on server I get the message vsjlib can not be fouund. Is there any service pack or link that I can download the whole vjslib.dll along with its dependencies?
Please help!
|
|
|
|
|
The J# runtime library is not included in the default .NET framework. That is a separate download that needs to be installed. I would suggest converting the app to C# or VB as J# is also a discontinued language and the runtime will not be updated to accomodate the .NET 3.0 or above.
Link: http://www.microsoft.com/downloads/details.aspx?FamilyID=f72c74b3-ed0e-4af8-ae63-2f0e42501be1&DisplayLang=en[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Kinda useless reply.... He was specifically looking for the zip functionality which is not present in either C# or VB.NET.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
exactly. My application is c# but am using that library for zip features so my question is where can I download that particular package that contains only that library and its dependencies?
|
|
|
|