TcpClient connect Problem

Monkster

New member
Joined
Aug 28, 2003
Messages
3
Hello all, Im hoping someone can help newbie me.

I have been trying to write a quick VB .NET program to connect to an IRC server, just to see how sockets work. The problem is every time I do a new tcpclient connect I get the following error:

An unhandled exception of type System.Net.Sockets.SocketException occurred in system.dll

Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full

---

This happens on ANY connect. Here was my simple code:

mobjClient = New TcpClient("irc.efnet.nl", 6667)

Nothing to hard there. Can anyone tell me why this would happen?

Ray
 
Wow, that was dead on what I was getting. Thanks I will try that this weekend. :) :)

Thank you again!

Monkster
 
The TcpClient is, in my opinion, a rather sub-par socket implementation. I suggest you look into making your own socket client class by making use of the System.Net.Sockets.Socket class and connecting, sending and recieving data yourself. Also, this way you can implement events, so you dont have to poll the TcpClient in its own thread or anything.

I believe there is some sort of example and tutorial in the MSDN.
 
Back
Top