.net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help!
.net unblockable sockets help! .net unblockable sockets help!
.net unblockable sockets help!
Go Back  Xtreme Visual Basic Talk > > > .net unblockable sockets help!


Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2004, 09:39 AM
Energy_uk Energy_uk is offline
Newcomer
 
Join Date: Aug 2004
Posts: 2
Default .net unblockable sockets help!


Hey all!

I'm trying to make a program that sits there and and can be used. But at any time another computer can connect and submit new information. I then want the original program to take the information and process it.

Now I haven't for long been working with VB.net, so I'm used to the Winsock way of working with things and I've only done one program with VB.net's sockets.

The problem is, is that .net sockets seem to stop the program from doing anything till a connection is recieved. It then does the job and ends. Now I'd like a way of it doing the same job each time a connection is recieved. I've been told I should look into unblockable sockets, but all information about these seem to be about C#.

Could anyone pass some information my way? Examples would be a god send! Thanks for your time!
Reply With Quote
  #2  
Old 08-19-2004, 01:42 AM
Energy_uk Energy_uk is offline
Newcomer
 
Join Date: Aug 2004
Posts: 2
Default

thanks for moving this to the right forum, sorry.

So yeah anyone can you please help, I've been stuck on this for ages....
Reply With Quote
  #3  
Old 12-30-2004, 09:58 AM
Bob 4666 Bob 4666 is offline
Newcomer
 
Join Date: Dec 2004
Posts: 4
Default Async Sockets

The answer I think you are looking for is Asynchronous Sockets. MSDN has loads of documentation on this under the Socket Class.

The methods are Beginxxxxx and Endxxxxx, i.e. BeginReceive, EndReceive etc. They operate in a non-blocking mode, asynchronously handling your interaction with the Socket and gives you the ability to receive data within a separate execution thread.

You can create a callback method that implements the AsyncCallback delegate and pass its name to the Beginxxxxx method.

Your callback method should implement the Endxxxxx method, which in the case of BeginReceive returns data in the buffer you provided.

Initially it looks a bit overwhelming, but works and should allow your application to provide a responsive user interface whilst also handling incoming network traffic.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
.net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help! .net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help! .net unblockable sockets help!
.net unblockable sockets help!
.net unblockable sockets help!
 
.net unblockable sockets help!
.net unblockable sockets help!
 
-->