High-Performance TLS With .NET?
Sep 6, 2010
I'm working on a project that calls for high-performance networking with TLS encryption in VB.NET. The stock SSLStream sucks rotten eggs; its 'asynchronous' read/write operations aren't async at all, meaning that they'll operate parallel to each other and to the main thread but that it offers absolutely nothing that resembles async read/read and write/write, which means that reads are totally synchronous to each other and writes are too (only 1 read and only 1 write can be done at a time).
I've done a lot of reading on this failing and it seems like MS has no intention of ever fixing this.Hoping a whole lot not to have to write my own TLS implementation. I've tried the Mentalis open source SSL suite, which will NOT compile. I've tried SocketWrench tools which will not compile under VS 2010 (and whose documentation indicates it's in fact synchronous on its async threads too; can only do 1 async read and 1 async write at a time).
What I want/need is an SSL/TLS implementation that actually works with DotNET that actually allows me to do multiple asynch reads/writes over a TCP/IP transport stream. Anybody have any experience or recommendations on 3rd party toolkits or alternate methods of SSLStream I/O?
View 1 Replies
ADVERTISEMENT
Sep 23, 2009
For logging purposes, some methods in our application include the following line:Dim Log As ILog = GetLog(Reflection.MethodBase.GetCurrentMethod().DeclaringType)I have what might be described as an irrational fear of reflection, which I try to keep in check. However, calls like this in methods that are executed potentially a hundred times a second concern me. I don't know as much as I should about reflection; but from looking briefly over the documentation, it looks to me like I could replace the following with:Dim Log As ILog = GetLog(Me.GetType())My question is three-fold:Does Me.GetType() actually return the same Type as GetCurrentMethod().DeclaringType? Does Me.GetType() actually do anything differently from GetCurrentMethod().DeclaringType, or is it doing the same thing under the hood?
View 3 Replies
Apr 27, 2009
I need to calculate the high score and am having trouble storing a value that represents the previous high score, and the comparator funcion.
Public n_sErrorTitle As String = "Entry Error"
'Count the number of entered scores
Dim intCount As Integer
[code]....
View 3 Replies
Aug 15, 2011
PFB the code for a search button where when a user enters a text in the text box ,it takes the keyword compares it with an xls which has 1600 rows and 16 columns with keywords.If the keywords match, it has to full the 3rd column where the name is specified.Its running but its taking more than 20-25 mins for processing.I knw searching 1600 rows and 16 columns will take time but pls advice if i can make this process a lil faster.
[Code]...
View 13 Replies
Apr 1, 2010
how can i save a high score in toolstrip textbox or listbox?
View 7 Replies
Jan 22, 2006
Where can I find some books that might be used at the High School level to teach students programming using Visual Basic from the ground up, assuming no knowledge of programming?
View 5 Replies
Dec 15, 2009
whats the difference with high and low level of programming
View 1 Replies
Jul 12, 2009
I made a game and i made a hp bar.So i made a Heal button but when the value is more then the Maximum value it crash.Any way to fix that? Like something to bypass that go go back to the Maximum Value?
View 7 Replies
Jun 8, 2012
I have been asked to improve the memory efficiency of an application that is used for high speed data acquisition. After running the VS memory profiler several times and scanning the projects for obvious issues I came to the following conclusion: despite using a fixed size circular buffer for storing acquired sample points, the RAM usage increases relative to the polling period. For example: polling data for one signal at 2 microseconds can use 5 times more memory (private bytes) than when running at 50 microseconds ... even though the buffer size is the same.
The circular buffer is an array of SamplePoint objects. Each of these objects contains an array of Shorts (16 bit) for corresponding data per signal and one date object (8 bytes) for the time stamp. For efficiency, the circular buffer is Redimmed only once every time it begins polling and filled with empty sample points which are then "assigned".
Also, it seems that when we stop and run the application it hogs even more memory each time as though the Redim is not releasing the previous array. My questions boil down to the following: What is most memory efficient way of implementing a circular buffer containing managed objects which have arrays?Also, how and why is memory usage increasing with a fixed size array with different polling speeds? Does the garbage collector not have time? Do local variables get disposed of IMMEDIATELY when a sub or function exits?These are some of the doubts and concerns that I would like to rule out before proceeding.
[Code]...
View 1 Replies
Aug 20, 2011
I am trying to create a high scores board - currently i was experimenting with just typing a number into a textbox and having it automatically order the numbers (in labels) from largest to smallest however i cannot get them all to work. either just the first and second (label) works or the second and third display the same number or the second decreases in value even though it shouldn't[code]...
View 7 Replies
Oct 28, 2010
I have two functions to find the high and low numbers from 5 different textboxes. I want the high in one label (which I have) an the low in another. I cannot seem to get the low number to be anything other than 0. Here is the code:
[Code]...
View 6 Replies
Aug 9, 2009
I'm having some doubts on which communication protocol/platform would be better for my current development. The focus is on communication performance, and while reliability matters, I can handle a some packet loss. UDP sounds like the correct choice, but then the following question came up:
"What would be better, using a UDP socket directly in .NET, or using a UDP socket implemented in unmanaged C++ with a wrapper to .NET?"I'm quite sure that C++ is faster than .NET, and while the communication might be faster, I'm not sure if that performance improvement is not lost with all the C++-to-.NET wrapping?
Some info about the project I'll be using this on:
- The core of the project will be all made in VB.NET.
- There'll be a high packet sending/receiving volume (about 100-200/sec).
- There'll be many clients requesting data to the server.
- Network communication will be over a GB-LAN.
- Data is time sensitive, and some packet loss is accepted.
- Running on .NET 3.5.
View 3 Replies
Sep 2, 2011
I want to make a wallpaper changer because windows high compresses the the image so you see artifacts even if already use a jpeg or even a really high quality png or bmp.
I know what I need to do for all of it I just need to know how to save an image to a jpeg without it being compressed. I have tried using the encoderparamters and getcodecinfo aswell as setting the quality to 100 but I still get a really bad looking image in the end.
Is there a way where I can save an image to a jpeg without getting the crappy image quality like with visual basic?
View 7 Replies
Oct 21, 2011
I have a graphics program and in it I use DrawEllipse plenty and when the pen thickness gets high like around 12 pixels or above you start to see these spikes. I'm using a PictureBox so double buffering is being used. Is there anything I can do to get rid of the "spikes". In the screenshot at top the pen thickness is at 19 and is 28 in the lower.
View 10 Replies
May 6, 2012
I'm working on a video game in VB .NET and I was wondering if there is any way to store its high scores online.If there is any way to do this, that would be great, but otherwise, I'd like to know what would be the best method of locally storing high scores on a single computer.
View 1 Replies
Jan 16, 2012
I have several services that use UDP messages to send out XML status information which is displayed in an application with a UDP listener. This works well. Some of our services are installed at a different site. The UDP messaging does not cross over the routers. Therefore, I wrote a TCP-UDP forwarder service that listens for the UDP messages at the remote site, then forwards them via TCP to a partner service in our local office. That partner service then re-sends the messages via UDP so we may monitor them.
My problem is that the method that sends the messages via TCP appears to be dropping a lot of the XML messages. When the service gets a UDP message, it enqueues it in a queue object for processing. The enqueue statement is enclosed in a synclock object. A separate thread dequeues the message using the same synclock object and sends it via TCP. Originally, I had the code written so that the TCP Send method instantiates the TCPClient, opens it, does a GetSteam, sends the message with a BinaryWriter, closes the writer, closes the stream, closes the client.
Next, I updated the code to declare the TCPClient at the module level. The send method checked to see if the TCPClient variable was nothing and, if it was nothing, instantiated it and connected it. If it was already instantiated, I just tried to re-use it. I close the TCPClient when the service runs the OnStop method. This way did not work. I get "The operation is not allowed on non-connected sockets." errors.
What is the best strategy for implementing a TCP sender that works in a high volume environment. I only have four services sending UDP messages that need to be forwarded at this time. I eventually will have many more.
View 4 Replies
Jun 16, 2012
I am trying to make file transfer program in vb.net 2008 for big files eg. 10 GB.i was able to code simple socket program to transfer files with small size by using Sockets but if the file is large then "File.ReadAllBytes(ComboBox1.Text)" command will not work cause it use lot of memory & if the file is really big i.e. 10 GB it give not enough memory error, so i made a loop that sends data in small amounts, but this give me a larger file size with repeated data at end of the file.
[code]...
View 7 Replies
Nov 2, 2010
I am working on a windows service and I am looking for a better solution to an issue with high CPU usage. The service needs to only 'run' every minute or two to gather some db data and do some light processing. Right now I have it running in a separate thread in the service application using the BackgroundWorker. In that thread, I do a Thread.Sleep(30000) after each db iteration. This has taken care of the CPU issue (obvious) but I am let thinking there is a better way. This works fine, I can still cancel the service without issue etc. however it feels wrong. Blocking that thread seems bad.
That being said, what is the best way to actually do this? I don't want the loop to just constantly run, I only want it to do work on a somewhat regular time frame. Would running this in a timer_elapsed event handler be a better way?
View 1 Replies
May 13, 2012
I need to create high quality icons for my current project in vb.net
This is my code so far,
Private Sub CreateIcon(ByVal bitmapName As String)
Try
Dim fi As New System.IO.FileInfo(bitmapName)
[Code].....
But the problem is it only gives me a very low quality icon at the end. how to make a higher quality image?
View 1 Replies
Sep 10, 2009
I am Writing a Program in Visual Basic 2008 for my High Schools Advanced Higher Coursework Project... The Game its self runs perfectly and i can display the highscores. i just need some help showing 10 hi-scorers and in ascending order.Currently i am using this code for viewing them.
Code:
Private Sub HiScores_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TmpHiScore As String 'Temporarly stores the data in file "HiScores.lol".
Dim intTempo As Integer = 1 'Stores the length of variable TmpHiScore.
[code]....
The hiscores them selfs are stored in a personalised text document and they are all on the one line. the format of this is NAME:SCORE,NAME:SCORE,NAME:SCORE and so on!
View 3 Replies
Mar 9, 2011
I have a small problem with process priorities (Win Server 2003 Standard, 8 Core, 16GB RAM). My VB.NET 2005 program starts a process like this:
Dim WithEvents proc As New Process
Sub Main()
proc.StartInfo.FileName = "blastx.exe"[code].....
In this case, blastx.exe runs on 4 cores.I would expect that my started process is idle and has 0% CPU usage while the system is under full load (I simulate this with prime95, 8 worker threads) and only runs if there are free resources. But it generates 25% cpu load and prime95 only 75% instead of expected 0%/100%. In the task manager, I can see that my process has the lowest priority and prime95 has the normal priority.
View 1 Replies
Jun 22, 2010
I have used flash(.swf) animation & high quality graphical image there in my vb.net application. But problem is that sometimes when I click on menu it shows small line under it & take time to load it. It shows line under menu when load another forms though there is no line under that menu. I have 25 forms & every form has high quality image(image size is 1280*1024). Is there any way to get rid of this problem? Is there any way to make my application smooth though its high graphical & animated?
View 1 Replies
Jun 18, 2010
I used to be visual basic 6 programmer, i was pleased with visual basic : it is high level language that do stuff fast,easy to learn, easy to do stuff in,you can drag and drop stuff to the form and write your code,it is simply amazing.however microsoft buried VB6 and pointed us to VB.NET which is so different that it is not the old VB anymore.I didn't like what microsoft did and would like to look somewhere AWAY from microsoft and from any other proprietary language I would like to look into a similar language that is easy,cross platform (windows / Linux), object oriented, visual design, non proprietary and compile (for some guarding against reverse engineering).
i am freelancer so the choice is entirely mine,i don't care about performance of programs, the time taken to develop a given programs is much more important. desktop / database / GUI /networking programming is what i am looking for.so any such language offered by our open source community ?
View 8 Replies
May 7, 2012
I am creating a type of pacman game, I have entered the code for everything else, but I am struggling with the code for the high score,[code]
View 2 Replies
Mar 2, 2012
I'm just curious how I get Windows to use the high quality cursor when dragging and dropping in my WPF application. What I mean by high quality is: Rather than the regular arrow with a rectangle. I tried using e.Effect but that didn't do anything... Am I doing something wrong? Or is this just how it is in WPF.
View 1 Replies
May 3, 2009
I have a program that uses low-level keyboard hooks, because it's a program that needs to be able to catch keystrokes, even when holding down capslock or what so ever.
Anyway, I figured out (by making a sample program running at the same time on purpose consuming 95% CPU by making an infinite loop with nothing in it) that low-level keyboard hooks stops working if the CPU usage is that high, and you do a lot of typing what so ever.
View 10 Replies
Apr 13, 2009
I am in a VB.NET class and I am currently modifing a game. I am trying to set up a High Scores system but a Null Refrence Exception error is making me angry.I am trying to reference a class called GameState which contains the Subroutines and variables to use the high scores. Below is the code for a form that is used to show the current high scores in two listboxes.
[Code]...
View 1 Replies
Aug 30, 2009
How would I use his code and get it to work with a RichTextBox when a button is clicked?
View 1 Replies
Jan 17, 2011
I am working on a simple game and wanted to save the high score in application settings. Research upon failure has shown that user is read/write but the program doesn't store it between runs.
View 7 Replies
Dec 28, 2010
I have a couple quick questions with the program that I am doing. This program is a hilo program and here are my remaining issues...
1. When I click the high or low button in my program it does not make changes to my token (I want the default tokens to be 100 and added 100 to the text property of my textbox so want to make sure I did that right)
2. In my program it only shows 13 possibilities but want to have the ability to add more
3. I also would like to change 1 to ace, 11 to jack, 12 to queen, and 13 to king and would like to get some assistance with that as well
[Code]...
View 1 Replies