Print Page | Close Window

VB.NET -- Creating an asynchronous socket

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10237
Printed Date: 28 March 2026 at 11:14pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: VB.NET -- Creating an asynchronous socket
Posted By: Diep-Vriezer
Subject: VB.NET -- Creating an asynchronous socket
Date Posted: 30 April 2004 at 4:30pm

Hey all,

I need to build this IRC bot, and I have to create a socket and a listener to send/recieve commands. It has to be asynchronous because it will take a huge number of requests.

Now I searched the internet (woot) and found some stuff, but none of them actually worked . So that's why I just wanted to ask you guys if you have any experience of sending and recieving data from and to a server.

I tought I created a nice piece of code, but it got all messed up whenever I tried to connect. The MSDN library has some articles, but I managed to get NONE of them to work.



-------------
Gone..



Replies:
Posted By: michael
Date Posted: 30 April 2004 at 11:35pm

Did you download the .net 101 code samples? They have a pretty need sample for a socket server and client, don't recall if async.

http://www.microsoft.com/downloads/details.aspx?FamilyId=08E3D5F8-033D-420B-A3B1-3074505C03F3&displaylang=en - http://www.microsoft.com/downloads/details.aspx?FamilyId=08E 3D5F8-033D-420B-A3B1-3074505C03F3&displaylang=en



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Mart
Date Posted: 01 May 2004 at 3:46am

http://www.devjunkies.com/?name=viewart&tid=26&type=1 - http://www.devjunkies.com/?name=viewart&tid=26&type= 1

This article may help you



Posted By: Diep-Vriezer
Date Posted: 01 May 2004 at 8:09am
Thx, I'll have a look

-------------
Gone..


Posted By: Mart
Date Posted: 01 May 2004 at 10:50am

That article actually tackles a server, to do a client you just need to delete all the TcpListener Stuff and make a new TcpClient like this:

Dim objTcpc As New TcpClient

and use the connect method like this:

objTcpc.Connect("hostname.com", 80)

You do all the reading and writing the same way.



Posted By: Diep-Vriezer
Date Posted: 01 May 2004 at 1:47pm
Well, a client needs to recieve right? I can't just keep sending data to a server without knowing what it responses.

-------------
Gone..


Posted By: Mart
Date Posted: 01 May 2004 at 2:47pm
You can receive data...


Posted By: Diep-Vriezer
Date Posted: 01 May 2004 at 5:04pm
Originally posted by michael michael wrote:

Did you download the .net 101 code samples? They have a pretty need sample for a socket server and client, don't recall if async.

http://www.microsoft.com/downloads/details.aspx?FamilyId=08E3D5F8-033D-420B-A3B1-3074505C03F3&displaylang=en - http://www.microsoft.com/downloads/details.aspx?FamilyId=08E 3D5F8-033D-420B-A3B1-3074505C03F3&displaylang=en

Thanks! This is pretty much all I need, thanks very much all!



-------------
Gone..



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net