C# - Implement WebSockets From Scratch With The .NET 4 Framework (and Nothing Else)?

Jun 22, 2011

I want to build a simple chat app where people can go a url, type in a name and a message and click submit and it will basically show that message to everyone that is current connected.Firstly i would like to state i've had zero experience in sockets programming and the like. I'm simply a web 2.0 person building websites with css/html/js/ajax and backend i have asp.net on vb and sql server for database.So basically coming from an ajax background, i was wondering why do we even need to download any additional stuff to do web sockets? I mean in ajax i can simply create a asd.aspx file and use Response.Write(text) (text based on the input which are available through dissecting the url) and voila, the server side is done, all that's left is just to create new XMLHttpRequest and stuff in the client side.

So ok I'm not worried about the client side part of Web Sockets. but the server side part of web sockets is just difficult. so in the client side i have this: ws://localhost:8080/websocket. Is it true that it will work if is also an .aspx file as such: ws://localhost:8080/websocket.aspx ?I'm wondering so how do i continue from here? in Ajax i will supply parameters from client in the url as such: page.aspx?a=1&b=2 and do output in the server using Response.Write it's all clear but how do we do it in web sockets?

View 1 Replies


ADVERTISEMENT

Creating A Corporate .Net Namespace Framework From Scratch?

Apr 21, 2009

We are migrating our applications to VB.Net 2008 from Classic VB and I need to create a base namespace and business layer. My method of approach is going to be to visit our top BA and identify the common areas of our (Fixed Income) company and try to form a decent inheritence model with as much of the code in generics as possible. What's everyone's experience of doing this and also as a second part of the question, we are looking at incorporating Web Focus into the OLAP side, how would this affect the design of the corporate namespace and it's derivatives?

View 3 Replies

Javascript - WebSockets Handshake Not Working

May 5, 2012

Im trying to get a connection between a JavaScript WebSocket and a TCP Server/Client applicat written in VisualBasic .Net . My problem is that the handshake fails. I do get a handshake request from the local website, but it does not accept my response.

The code of the JavaScript file:

<script type="text/javascript">
var ws;
function connect() {

[Code]....

I now get the correct Sec-WebSocket-Accept String (dXOwyU6vuIMy61iK64Xi0VrmyOQ=), anyway the WebSocket seems not to handle the handshake response. I tried debugging it with the Chrome Developer Tools, but I don't get usefull information from it.

View 1 Replies

Web Brower From Scratch?

Nov 14, 2010

I was wondering is it would be possible to create a web browser from scrach(meaning not the webbrowser object) in Visual basic(or any other visual studio languages).

View 3 Replies

Creating Database From Scratch

May 18, 2012

I am trying to create an empty table from scratch using Microsoft SQL Server Compact 3.5 and I am running into this problem.Please take a look at the screenshot below.[code]How come I do not have the same screenshot as the web site link below as Frank Smith showed in his example? What Do I have to do/install to have the same screenshot as in the web site below? I have Visual Studio 2008, Microsoft SQL Server 2005 and Microsoft SQL Server Compact 3.5 installed on my computer..url...

View 1 Replies

Custom Control From Scratch?

Jun 13, 2009

This is purely academic-- I'm looking for an example of a custom control, created from scratch as in not built out of existing controls, you're actually handling drawing it, ect entirely yourself.

View 4 Replies

System.Drawing.Graphics From Scratch?

Jul 15, 2010

Rather than create a Form and use Graphics generated via the CreateGraphics Method, how does a System.Drawing.Graphics Object get built?

View 16 Replies

VS 2008 Create Bitmap From Scratch?

Dec 25, 2009

I want to know how I could create a bitmap from scratch with no images to start with.(I would say need. but than you would think this was for some sort of school project and it's not.)Basically, what I have is an image which is perfectly square in shape and has a black border with a black x going through it, what is not black is white. What I'm looking to know is how to take that small image (50x50 pixels) and make an image based upon those by placing them in X Rows of X amount. I'll make a couple example to show what I mean.(X's represent the 50x50 image.

[Code]...

View 7 Replies

VS 2010 CPU Stress Test Program From Scratch?

Oct 12, 2010

i would like for my first project to be a CPU stress testing program (kind of like Core Damage or Intel Burn Test).I have no problem designing the form, but how and where should I start? I've done some searching, but haven't really found much. I think the reason for that is because nobody is really going to just give out source code for anything (which is completely understandable).

The main thing I would like to understand is what exactly makes the CPU work at 100%? And how could I design it to where it automatically determines the amount of cores/threads the CPU has, and utilize them 100% without having to open up one instance for each? Or is that jumping too far ahead?

EDIT > I know that I'll need to create some kind of loop for the CPU to process over and over until closed. I was thinking something along the lines of calculating Pi to 32 million digits or something like that.

> Another goal is to have some sort of error checking capability. I am an overclocker, and I would like to have this ability with this program. For example, it I make it to calculate Pi, then I would like for it to tell me if there were any errors in the digits it produced.

View 8 Replies

Create A New Battery From Scratch While Using The Old Code As A Reference Point?

May 13, 2012

I'm currently starting a new job in which I will be working on some coding in the future and need some advice on some good places to start so I can learn this correctly. Essentially we need to bring VB4 code over to the new VB.net language and I will be tasked with this. The project consists of a large battery of tests for psychiatric patients consisting of mostly multiple choice questions presented one at a time - since VB4 isn't very compatible, I think I will create a new battery from scratch while using the old code as a reference point.

I started creating the code this weekend for fun and am really enjoying it. However, a huge problem has been the abandonment of control arrays in the new language... by the time I got to creating my first questionnaire I'm stumped and can't follow the old code. Clearly I'm not ready to tackle such a large project with no experience and need to start from scratch; who would have thought .

The reason why I'm here is not to ask you to help me with my work. What I'm wondering is if any of you have any cool advice of great places to start learning the language (books, websites, etc). The amount of literature is very overwhelming so I thought I would ask some people with experience for tips. If any of you have stumbled across learning material with emphasis on coding that would be useful in the design of questionnaires or multiple choice exams, it would be particularly useful.

So far my starting place is Visual Basic 2010 Step by Step with Michael Halvorson, it seems good at a glance in the sense that it couples theory with practice but I'm already sure I'll need a little more.

View 12 Replies

VS 2008 Adding A Record / Create A Database From Scratch?

Feb 2, 2010

I'm following the sops from msdn on how to create a database from scratch. I would now like to programmatically add a single record via a command button?

View 3 Replies

When Creating An Bitmap Image From Scratch, The Quality Stinks?

Mar 19, 2010

The Vb.Net application creates a bitmap from scratch and either converts to a tiff or sends it to a printer. In both cases, the quality of the image (in this case the font) is not good at all. The sample code listed below creates the graphics object that I use to write to the image.

Dim gr2 As Graphics = Graphics.FromImage(New Bitmap(800, 1000), Imaging.PixelFormat.Format32bppPArgb))

[code]......

View 2 Replies

Wpf - Drag And Drop For Listbox From Scratch MVVM Using ICommand?

May 4, 2012

Without using MVVMLight, I need to implement drag and drop for photos onto a listbox using mvvm using Icommands preferably and interaction triggers, however if i use commands then I don't know what to pass in for a command parameter? Any ideas? Thanks.

Heres some ideas I tried:

Public Property ImageList As New ObservableCollection(Of ListBoxItem)
Public Property AddImageCommand As ICommand = New Adjuster.DelegateCommand(AddressOf addImage)
Public Property DropCommand As ICommand = New Adjuster.DelegateCommand(AddressOf dropImage)

[code]....

View 1 Replies

Performance Related Features For Migration From .net 2003 Framework 1.1 To .net 2008 Framework 3.5?

May 21, 2010

I am work on VB.net 2003 Framework 1.1 for last 3.5 years in windows Application.We are currently migrating to VB.net 2008 framework 3.5, but i don't know about the features which related to ADO.net and which is important to performance. I know linq to SQL but our architecture is made in .net 2003 so we should follow this.Any features which is very important to enhance the performance?

View 2 Replies

Upgrading .Net Project From Framework 1.1 To Framework 4.0?

Feb 2, 2011

I have a solution that I wish to upgrade from Vb.net framework 1.1 to framework 4.0. The solution consists of a number of projects, all but one of which compile to dll's. The master project compiles to a executable which provides a menuing system which dynamically loads the dll's and connects to entry points.

The projects contain normal classes, numbers of forms and also controls, which are either usercontrols or are inherited extensions of standard windows controls.There are a number of third party components (eg reporting and grid controls from Component One, Ribbon control from DevExpress etc).

[Code]...

View 4 Replies

Software Created In An Older Framework Version Won't Run On A Newer Framework Version?

Apr 7, 2009

How come software created in an older framework version won't run on a newer framework version? Actually whenever i try to run some old specific software having .net 3.5 framework on my PC they show they needs .net framwork 1.1 . What a bad thing?My newer version of Photoshop ans Ms office open all lower version files.

View 6 Replies

Build Own Framework Using .Net Framework?

Nov 24, 2011

I work for a small company and we are planning to build our own framework using .net . For example if a dropdown is placed in the form and set the custom property to Users, then the users list from db from has to populate. The developer will drag and drop the custom control and set the connection string in config file. Other things are to be managed by the framework.

View 4 Replies

C# - Are Microsoft Entity Framework And ADO.NET Entity Framework (.edmx) The Same

May 13, 2010

c# - Are Microsoft Entity Framework and ADO.NET Entity Framework (.edmx) the same?

View 7 Replies

Implement Something In VB?

Mar 14, 2011

How to implement such a feature in vb.net??

View 3 Replies

Implement WCF In VB?

Apr 5, 2012

We have a vb.net application where we have implemented multithreading. We determined that we need to either implement .net remoting or WCF. After researching remoting in .NET on MSDN, Microsoft considers remoting legacy for .NET framework 4.0 and recommends using WCF instead. My question is: can we implement WCF functionality into our VB.NET application or do we need to rewrite the app from the ground up in WCF?

View 1 Replies

Implement Threading In App?

Sep 1, 2010

I have a program that I would like to implement using Threading.I wand to load a form that takes a couple of minutes to open using threading.Here is my code

Imports System.Threading
Public Class frmAdjustments

Function LaunchForm() As Integer[code].....

I am new to .net programming and could use any suggestions you may have. I'm trying to grasp the concept of multithreading apps and would like to have both my main form (Adjustments) and the (frmNewAdjustments) form to load concurrently.Here is the error I receive with the code above: Overload resolution failed because no accessible 'New' can be called with these arguments:

View 3 Replies

.net - Implement VB With Statement In C#?

Sep 3, 2010

How would you create an extension method which enables me to do the following (warning: exteme pseudo-code)...

class FooBar
{
Int32 Foo { get; set; }
String Bar { get; set; }
}
new FooBar().With(fb => new Func<FooBar, Object>(instance =>

[Code]...

View 5 Replies

C# - How To Implement Of A Generic In .net

Mar 13, 2011

This is just a Translation question. But how do you write a the following C# code in vb.net My problem is that i don't know how to rewrite the this part of the generic T. C# code i want to translate

public static void ShouldEqual<T>(this T actualValue, T expectedValue) {Assert.AreEqual(expectedValue, actualValue); }

[Code]...

View 1 Replies

C# - How To Implement Tracing In .net

Aug 7, 2009

I am implementing a tracing mechanism myself. Now what I'd like to know is what is the best way to implement this mechanism(I mean, the architecture).[code]But then I saw there is an TraceListener class that let's me implement Write and WriteLine methods. The big drawback is that both those methods allow only strings as arguments, and I'd want to be able to send a lot more info than strings. What should I do? Maybe my first ideia is the best?I do know there are a lot of tracing mechanisms like PostSharp and so, I'm just doing this for learning purposes!

View 1 Replies

C# - Implement A Bitboard In .NET?

Mar 9, 2012

My Questions are: Is is possible to implement a bitboard in vb.net? Tutorial/Reference to do bitboard in VB?

C# answers are acceptable because it's not that hard to translate.

View 5 Replies

C# - Implement The Equivalent Of SQL IN() Using .net?

Aug 4, 2010

In .net (c# or vb) expressions, how would you implement SQL's handy IN() functionality?i.e. value in (1, 2, 4, 7)rather than:

value = 1 or value = 2 or value = 4 or value = 7

There are obviously many ways, I'm looking for the most clean and simple!

View 7 Replies

C# - When Should Implement IDisposable

Mar 12, 2010

What is the best practice for when to implement IDisposable? Is the best rule of thumb to implement it if you have one managed object in the class, or does it depend if the object was created in the class or just passed in? Should I also do it for classes with no managed objects at all?

View 6 Replies

Can't Implement The Interface

Aug 7, 2009

I am trying to implement an interface defined in IDL, in a vb.net class here is the idl

interface IEmissaryRoot : IDispatch {
id(0x68030000), propget]
out, retval] IActivityCol** );

[code]....

View 3 Replies

DirectCast How To Implement

Jan 14, 2012

i am using code to the value textbox2.text in the report and using the code like below [code]the textbox2 take various values in run time but when i run the code it display only the final value intermediated values are not displayed the whole situation is as follows.[code]

View 1 Replies

How To Implement A Regex

Aug 12, 2011

I would like to use regex for a txt file as follows. What I want to do is to get the whole text if CRC is other than 00000000. The content of the file below has 2 blocks of data below. And I should get the second one after the regex operation.

[Code]...

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved