|
Hello,
i had a running UDP-Server, but had the problem, that only every second package coming on. So now i wanted to re-code it with Socket and not using the UdpClient.
If i want to receive a datagram with Socket.EndReceiveFrom(ar,ref ep) it doesn't works. I get a NullReferenceException (i think the "ep" is the problem), but if i use Socket.EndReceive(ar) it works well.
Here the code:
string szData;
IPEndPoint ipe = new IPEndPoint(IPAddress.Any, 0);
EndPoint ep = (EndPoint)ipe;
int len = parent.udp_listen.EndReceiveFrom(ar,ref ep);
szData = Encoding.ASCII.GetString(buffer, 0, len);
"parent.udp_listen" is the public UdpClient which is in another class.
So what's wrong... is there another possibility to find out who is the sender of the datagram? Because i need the IP Address and the sending-Port of the sender.
Thanks
|
|
|
|
|
Is there a job market in Aus for C#.net asp.net ???
Just curious ...
|
|
|
|
|
Is this the right section to post this ??
|
|
|
|
|
Well, where the hell would you post it ???
|
|
|
|
|
Probably in the Lounge[^]
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
No, to my knowledge Australia is not allowed to use .NET, let alone C#. This is why Chris Maunder moved to Canada.
|
|
|
|
|
Well thats encouraging ...
|
|
|
|
|
hi.
i have webpage that contain textbox. here is textbox code:
<input name="cardtxt1" maxlength="4" id="cardtxt1" tabindex="1" class="txtform" onpaste="doNotPaste()" onfocus="getName(this);documentFocus('cardtxt1');" onkeypress="return check_KeyPress(this,2,'0123456789')" onkeydown="noCTRL(event);" onkeyup="nextTab(this, false);" autocomplete="off" style="width: 32px;" type="text">
and i want set textbox value by this command:
HTMLInputElement card = (HTMLInputElement)doc.all.item("cardtxt1", 0);
card1.value = Value;
but my problem is after DocumentCompleted there is no value in textbox. value assigned to textbox before it get focused and when textbox get focused value will be cleared in textbox. how can i assign value to textbox after it get focused ?
or can i remove focus on textbox ?
|
|
|
|
|
I'm get in stuck of deployment an desktop application. My app was compiled against .net 3.5. On machine that doesn't have .net 3.5, the setup has to download .net 3.5 before install the app. The problem is download .net 3.5 take close to an hour, then user might cancel installation process.
I already compiled my app against .net 3.5 client profile, but it still take 5-10 minutes to download and still let users go away.
I dont know if there's a way to embed .net class library into my desktop app, so it could run without .net frx, or could we compile the app into native code?
Please help me if you have answer
Thanks.
|
|
|
|
|
No. Just mention it in the documentation or download site or whatever so that potential users know that .net is required before they download your app.
Most Windows systems already have it, so I wouldn't be especially concerned.
|
|
|
|
|
Almost user have .net 1.1 or 2.0. Since my app used .net 3.5, they have to have close to 1 hour to download .net 3.5 which will let users go away...
|
|
|
|
|
But that's really none of your concern.
|
|
|
|
|
It's absolutely my concern
|
|
|
|
|
AFAIK Windows Vista and Windows 7 have all versions of .NET up to 3.5 preinstalled; as 3.5 is a pure superset of 2.0 (and much larger), if you don't really need the new stuff (such as WPF), it could be advantageous to build against 2.0 as this has even better chances of being present (on XP and older), and when not will download faster. I build against 2.0 unless I really need one of the extensions...
|
|
|
|
|
Indeed, build against the lowest version you can.
Don't use the latest features unless they offer a real benefit.
|
|
|
|
|
Thank guys.
Bad news is i used WPF, then i could compile against .net 3.0 or 3.5. 3.0 is as fat as 3.5, then i compiled against .net 3.5 client profile.
However, it also took close to 10 mins to download .net 3.5 client profile, then i'm looking for better solution...
|
|
|
|
|
The options are only :
1. Release your software together with .NET Framework, so the user can install it directly.
2. If you don't want .NET Framework, write your code in C++.
3. There is a tool to make .NET EXE to native code, and it is very expensive.
So.. I prefer the first one. It is cheap and easy.
Or read this :
http://msdn.microsoft.com/en-us/library/ms994395.aspx[^]
|
|
|
|
|
No, it really isn't; stop looking for problems where none exist.
|
|
|
|
|
Hey !
I was wondering if anyone knows how to wrap up a deployment ( files .. msi, setup.exe etc etc ) into one single setup.exe. ???
Is there a 3rd party product that does this or some code that I could make use of ??
Any ideas ??
Thanks in advance ..
|
|
|
|
|
Surely it is the other way round. Everything gets wrapped up into one *.msi file.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You can write some piece of code to zip both msi and setup.exe file into one zip file, then make an executable zip file.
I myself used ICSharpCode.SharpZipLib to zip file, then use ChilkatZipSE to do the next job.
|
|
|
|
|
That is interesting.
Could you explain the logic of that, because surely you don't need a Setup.exe, if you have an *.msi installer.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The msi file got everything, but we still need setup.exe to as a boot trapper to detect prerequisites (.net frx, windows installer, ...).
So user should run setup.exe to perform checking prerequisites, then setup.exe call msi file to begin installation process.
|
|
|
|
|
OK, thanks.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks !!! Not sure if I will do it that way but thanks .
|
|
|
|